Skip to content

Commit 11912b7

Browse files
committed
improve typing of init fcn
1 parent 3aa3a58 commit 11912b7

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

packages/express/src/app.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -198,9 +198,11 @@ app.listen(port, () => {
198198
logger.info(`Express app listening on port ${port}!`);
199199
});
200200

201-
init();
201+
init().catch((e) => {
202+
logger.error(`Error initializing app: ${JSON.stringify(e)}`);
203+
});
202204

203-
async function init(): void {
205+
async function init(): Promise<void> {
204206
while (!listening) {
205207
await new Promise((resolve) => setTimeout(resolve, 100));
206208
}

0 commit comments

Comments
 (0)