diff options
author | Catalan Lover <48515417+FSG-Cat@users.noreply.github.com> | 2022-08-23 23:50:01 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-23 23:50:01 +0200 |
commit | d63451b3fe6c0c6ab175adec82361834bb3633f5 (patch) | |
tree | b738ee25bf9819300e1802ba9a8e2813e9dc2588 /src/gateway/Server.ts | |
parent | Merge pull request #1 from FSG-Cat/FSG-Cat-patch-1 (diff) | |
parent | Check Captcha (diff) | |
download | server-d63451b3fe6c0c6ab175adec82361834bb3633f5.tar.xz |
Merge branch 'fosscord:staging' into Bug-Report-Template
Diffstat (limited to 'src/gateway/Server.ts')
-rw-r--r-- | src/gateway/Server.ts | 18 |
1 files changed, 5 insertions, 13 deletions
diff --git a/src/gateway/Server.ts b/src/gateway/Server.ts index 82fbeba2..97da3fa0 100644 --- a/src/gateway/Server.ts +++ b/src/gateway/Server.ts @@ -1,9 +1,9 @@ -import dotenv from "dotenv"; -dotenv.config(); import { closeDatabase, Config, getOrInitialiseDatabase, initEvent } from "@fosscord/util"; +import dotenv from "dotenv"; +import http from "http"; import ws from "ws"; import { Connection } from "./events/Connection"; -import http from "http"; +dotenv.config(); export class Server { public ws: ws.Server; @@ -11,15 +11,7 @@ export class Server { public server: http.Server; public production: boolean; - constructor({ - port, - server, - production, - }: { - port: number; - server?: http.Server; - production?: boolean; - }) { + constructor({ port, server, production }: { port: number; server?: http.Server; production?: boolean }) { this.port = port; this.production = production || false; @@ -39,7 +31,7 @@ export class Server { this.ws = new ws.Server({ maxPayload: 4096, - noServer: true, + noServer: true }); this.ws.on("connection", Connection); this.ws.on("error", console.error); |