1
0
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:
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 // 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;