diff options
author | TheArcaneBrony <myrainbowdash949@gmail.com> | 2022-09-04 15:14:55 +0200 |
---|---|---|
committer | TheArcaneBrony <myrainbowdash949@gmail.com> | 2022-09-04 15:14:55 +0200 |
commit | 58111e9df42b9c39643f4f89c8e032010ff0c28a (patch) | |
tree | ce1b8c5d79e04a972af5711899c27fba841e5706 | |
parent | Prettier (diff) | |
download | server-58111e9df42b9c39643f4f89c8e032010ff0c28a.tar.xz |
Revert "Merge pull request #873 from fosscord/dev/Maddy/fix/listeningAfterDb"
This reverts commit 8c92b197e49db0971189ba70e139170f403c8dc6. Reason: Breaks threading for unknown reasons.
-rw-r--r-- | src/Server.ts | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/Server.ts b/src/Server.ts index 83120412..83e16fa6 100644 --- a/src/Server.ts +++ b/src/Server.ts @@ -35,6 +35,7 @@ process.on("SIGTERM", () => { //this is what has been added for the /stop API route async function main() { + server.listen(port); await getOrInitialiseDatabase(); await Config.init(); @@ -51,10 +52,7 @@ async function main() { app.use(Sentry.Handlers.requestHandler()); app.use(Sentry.Handlers.tracingHandler()); } - - server.listen(port); await Promise.all([api.start(), cdn.start(), gateway.start()]); - if (Config.get().sentry.enabled) { app.use(Sentry.Handlers.errorHandler()); app.use(function onError(err: any, req: any, res: any, next: any) { @@ -62,7 +60,6 @@ async function main() { res.end(res.sentry + "\n"); }); } - console.log(`[Server] ${green(`listening on port ${bold(port)}`)}`); // PluginLoader.loadPlugins(); } |