diff options
author | Madeline <46743919+MaddyUnderStars@users.noreply.github.com> | 2023-04-24 23:40:07 +1000 |
---|---|---|
committer | Madeline <46743919+MaddyUnderStars@users.noreply.github.com> | 2023-04-24 23:40:07 +1000 |
commit | 797778db68934be807594ad1dfc124a1cf7db63d (patch) | |
tree | a759056de60fb7ed285314e63d378315dfef40b0 /src | |
parent | Merge branch 'master' into openapi (diff) | |
download | server-797778db68934be807594ad1dfc124a1cf7db63d.tar.xz |
start listening before starting components in bundle
Diffstat (limited to 'src')
-rw-r--r-- | src/bundle/Server.ts | 4 |
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); |