Skip to content

Commit

Permalink
fix(cli): Add unhandledRejection handler to generated index file (#2932)
Browse files Browse the repository at this point in the history
  • Loading branch information
daffl authored Dec 15, 2022
1 parent 59c3b8d commit e3cedc8
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/cli/src/app/templates/index.tpl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ import { logger } from './logger'
const port = app.get('port')
const host = app.get('host')
process.on('unhandledRejection', (reason, p) =>
logger.error('Unhandled Rejection at: Promise ', p, reason)
)
app.listen(port).then(() => {
logger.info(\`Feathers app listening on http://\${host}:\${port}\`)
})
Expand Down

0 comments on commit e3cedc8

Please # to comment.