Skip to content

Commit e3cedc8

Browse files
authored
fix(cli): Add unhandledRejection handler to generated index file (#2932)
1 parent 59c3b8d commit e3cedc8

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

packages/cli/src/app/templates/index.tpl.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ import { logger } from './logger'
88
const port = app.get('port')
99
const host = app.get('host')
1010
11+
process.on('unhandledRejection', (reason, p) =>
12+
logger.error('Unhandled Rejection at: Promise ', p, reason)
13+
)
14+
1115
app.listen(port).then(() => {
1216
logger.info(\`Feathers app listening on http://\${host}:\${port}\`)
1317
})

0 commit comments

Comments
 (0)