1
0
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:
Jack Foltz 2018-07-26 13:16:42 -04:00
parent d0b26a7021
commit 58e25e4e2a
Signed by: foltik
GPG Key ID: 303F88F996E95541

View File

@ -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;