summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Server.ts5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/Server.ts b/src/Server.ts

index ea1e39b0..f49b5a00 100644 --- a/src/Server.ts +++ b/src/Server.ts
@@ -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: {