Skip to content

Commit

Permalink
terminate server on unhandled promise rejection
Browse files Browse the repository at this point in the history
  • Loading branch information
shubha-rajan committed May 4, 2020
1 parent 8408f0b commit 75e4be1
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions cloud-sql/sqlserver/mssql/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -192,4 +192,9 @@ const server = app.listen(PORT, () => {
console.log('Press Ctrl+C to quit.');
});

process.on('unhandledRejection', err => {
console.error(err);
process.exit(1);
});

module.exports = server;

0 comments on commit 75e4be1

Please sign in to comment.