summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorMadeline <46743919+MaddyUnderStars@users.noreply.github.com>2023-04-24 23:40:07 +1000
committerMadeline <46743919+MaddyUnderStars@users.noreply.github.com>2023-04-24 23:40:07 +1000
commit797778db68934be807594ad1dfc124a1cf7db63d (patch)
treea759056de60fb7ed285314e63d378315dfef40b0 /src
parentMerge branch 'master' into openapi (diff)
downloadserver-797778db68934be807594ad1dfc124a1cf7db63d.tar.xz
start listening before starting components in bundle
Diffstat (limited to 'src')
-rw-r--r--src/bundle/Server.ts4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/bundle/Server.ts b/src/bundle/Server.ts
index 6ba74be6..d281120d 100644
--- a/src/bundle/Server.ts
+++ b/src/bundle/Server.ts
@@ -51,7 +51,9 @@ async function main() {
 	await Config.init();
 	await Sentry.init(app);
 
-	server.listen(port);
+	await new Promise((resolve) =>
+		server.listen({ port }, () => resolve(undefined)),
+	);
 	await Promise.all([api.start(), cdn.start(), gateway.start()]);
 
 	Sentry.errorHandler(app);