mirror of
https://github.com/spacebarchat/server.git
synced 2026-08-28 21:18:17 +00:00
Move component starts to before sentry enabling
This commit is contained in:
+4
-2
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user