From eb6202810363a621f32c1ed5ddbd7f256c73c6d8 Mon Sep 17 00:00:00 2001 From: Madeline <46743919+MaddyUnderStars@users.noreply.github.com> Date: Mon, 24 Apr 2023 23:42:25 +1000 Subject: [PATCH] start listening before starting components in bundle --- src/bundle/Server.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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);