diff --git a/src/node/app.ts b/src/node/app.ts index aa18b0843..b969a2fbd 100644 --- a/src/node/app.ts +++ b/src/node/app.ts @@ -24,7 +24,7 @@ export const createApp = async (args: DefaultedArgs): Promise<[Express, Express, : http.createServer(app) let resolved = false - await new Promise(async (resolve2, reject) => { + await new Promise(async (resolve2, reject) => { const resolve = () => { resolved = true resolve2() @@ -46,10 +46,10 @@ export const createApp = async (args: DefaultedArgs): Promise<[Express, Express, logger.error(error.message) } } - server.listen(args.socket, () => resolve(server)) + server.listen(args.socket, resolve) } else { // [] is the correct format when using :: but Node errors with them. - server.listen(args.port, args.host.replace(/^\[|\]$/g, ""), () => resolve(server)) + server.listen(args.port, args.host.replace(/^\[|\]$/g, ""), resolve) } })