mirror of
https://github.com/Foltik/Shimapan
synced 2024-11-30 14:31:42 -05:00
Remove SIGINT handler and only listen upon server start
This commit is contained in:
parent
d0b26a7021
commit
58e25e4e2a
14
server.js
14
server.js
@ -63,16 +63,10 @@ app.use((err, req, res, next) => {
|
|||||||
|
|
||||||
// Start app
|
// Start app
|
||||||
const port = process.env.PORT || 8080;
|
const port = process.env.PORT || 8080;
|
||||||
const server = app.listen(port);
|
const server = app.listen(port, () => {
|
||||||
console.log('Listening on port ' + port + '...\n');
|
console.log('Listening on port ' + port + '...\n');
|
||||||
|
|
||||||
// Handle sigint
|
|
||||||
process.on('SIGINT', () => {
|
|
||||||
console.log('Shutting down...');
|
|
||||||
process.exit(0);
|
|
||||||
});
|
});
|
||||||
|
|
||||||
// Expose app
|
// Expose app
|
||||||
exports.db = db;
|
module.exports.app = app;
|
||||||
exports.server = server;
|
module.exports.server = server;
|
||||||
exports.app = app;
|
|
||||||
|
Loading…
Reference in New Issue
Block a user