Skip to content

Commit

Permalink
fix: Catch unhandled rejections on server starts
Browse files Browse the repository at this point in the history
  • Loading branch information
paveltiunov committed Nov 1, 2019
1 parent f43edb3 commit fd9d872
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/cubejs-cli/templates.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ const server = new CubejsServer();
server.listen().then(({ port }) => {
console.log(\`🚀 Cube.js server is listening on \${port}\`);
}).catch(e => {
console.error('Fatal error during server start: ');
console.error(e.stack || e);
});
`;

Expand Down
3 changes: 3 additions & 0 deletions packages/cubejs-server/bin/dev-server.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,7 @@ const server = new CubejsServer();

server.listen().then(({ port }) => {
console.log(`🚀 Cube.js server is listening on ${port}`);
}).catch(e => {
console.error('Fatal error during server start: ');
console.error(e.stack || e);
});

0 comments on commit fd9d872

Please sign in to comment.