mirror of
https://github.com/spacebarchat/server.git
synced 2024-11-11 05:02:37 +01:00
🐛 use port from .env file
This commit is contained in:
parent
075d19607f
commit
801eee1cb3
@ -6,11 +6,14 @@ import { Server as WebSocketServer } from "ws";
|
||||
import { Connection } from "./events/Connection";
|
||||
import Config from "./util/Config";
|
||||
|
||||
var port = Number(process.env.PORT);
|
||||
if (isNaN(port)) port = 8080;
|
||||
|
||||
export class Server {
|
||||
public ws: WebSocketServer;
|
||||
constructor() {
|
||||
this.ws = new WebSocketServer({
|
||||
port: 8080,
|
||||
port,
|
||||
maxPayload: 4096,
|
||||
// perMessageDeflate: {
|
||||
// zlibDeflateOptions: {
|
||||
|
Loading…
Reference in New Issue
Block a user