summary refs log tree commit diff
diff options
context:
space:
mode:
authorMadeline <46743919+MaddyUnderStars@users.noreply.github.com>2022-09-04 18:15:02 +1000
committerMadeline <46743919+MaddyUnderStars@users.noreply.github.com>2022-09-04 18:17:27 +1000
commit0cd59bbe374581c7c3e008b74f03f5f40c0da4b0 (patch)
tree4db20fb09f7ae458669d22bdfd4ac35ebb038701
parentMerge branch 'staging' into dev/Maddy/fix/listeningAfterDb (diff)
downloadserver-0cd59bbe374581c7c3e008b74f03f5f40c0da4b0.tar.xz
Move component starts to before sentry enabling
-rw-r--r--src/Server.ts6
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();
 }