1
0
mirror of https://github.com/spacebarchat/server.git synced 2024-11-25 11:43:07 +01:00

start listening before starting components in bundle

This commit is contained in:
Madeline 2023-04-24 23:40:07 +10:00
parent 40ad7bb3af
commit 797778db68
No known key found for this signature in database
GPG Key ID: 1958E017C36F2E47

View File

@ -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);