diff options
author | Madeline <46743919+MaddyUnderStars@users.noreply.github.com> | 2022-09-04 18:15:02 +1000 |
---|---|---|
committer | Madeline <46743919+MaddyUnderStars@users.noreply.github.com> | 2022-09-04 18:17:27 +1000 |
commit | 0cd59bbe374581c7c3e008b74f03f5f40c0da4b0 (patch) | |
tree | 4db20fb09f7ae458669d22bdfd4ac35ebb038701 | |
parent | Merge branch 'staging' into dev/Maddy/fix/listeningAfterDb (diff) | |
download | server-0cd59bbe374581c7c3e008b74f03f5f40c0da4b0.tar.xz |
Move component starts to before sentry enabling
-rw-r--r-- | src/Server.ts | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/Server.ts b/src/Server.ts index 89a3cea2..c28ca0f9 100644 --- a/src/Server.ts +++ b/src/Server.ts @@ -51,6 +51,10 @@ 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) { @@ -59,8 +63,6 @@ async function main() { }); } - server.listen(port); - await Promise.all([api.start(), cdn.start(), gateway.start()]); console.log(`[Server] ${green(`listening on port ${bold(port)}`)}`); // PluginLoader.loadPlugins(); } |