diff --git a/index.js b/index.js index e62cfd5..4c9830d 100644 --- a/index.js +++ b/index.js @@ -16,7 +16,7 @@ try { config = require("./config.json"); } catch(err) { console.error("Couldn't load config, using defaults."); - console.error(JSON.stringify(config), ' ', 4); + console.error(JSON.stringify(config, ' ', 4)); } app.use(require('compression')()); @@ -75,3 +75,6 @@ var server = app.listen(config.port, function () { var port = server.address().port; console.log('Server listening at http://%s:%s', host, port); }); + +process.on("SIGINT", () => process.exit(0)); +process.on("SIGTERM", () => process.exit(0)); \ No newline at end of file