diff options
Diffstat (limited to 'src/Server.ts')
-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(); } |