16 lines
562 B
JavaScript
16 lines
562 B
JavaScript
const app = require('./index.js')
|
|
|
|
const port = process.env.PORT || '80'
|
|
app.listen(port, () => {
|
|
console.log('Server listening on port '+port);
|
|
});
|
|
|
|
process.on('unhandledRejection', (reason, promise) => {
|
|
console.log('Unhandled Rejection at:', promise, 'reason:', reason);
|
|
// Application specific logging, throwing an error, or other logic here
|
|
});
|
|
|
|
process.on('uncaughtException', (err, origin) => {
|
|
console.log('Caught exception: ', err, 'Exception origin: ', origin);
|
|
// Application specific logging, throwing an error, or other logic here
|
|
}); |