mirror of
https://github.com/Foltik/Shimapan
synced 2024-11-13 00:26:55 -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
|
||||
const port = process.env.PORT || 8080;
|
||||
const server = app.listen(port);
|
||||
console.log('Listening on port ' + port + '...\n');
|
||||
|
||||
// Handle sigint
|
||||
process.on('SIGINT', () => {
|
||||
console.log('Shutting down...');
|
||||
process.exit(0);
|
||||
const server = app.listen(port, () => {
|
||||
console.log('Listening on port ' + port + '...\n');
|
||||
});
|
||||
|
||||
// Expose app
|
||||
exports.db = db;
|
||||
exports.server = server;
|
||||
exports.app = app;
|
||||
module.exports.app = app;
|
||||
module.exports.server = server;
|
||||
|
Loading…
Reference in New Issue
Block a user