mirror of
https://github.com/demostf/demoserver.git
synced 2026-06-03 13:54:12 +02:00
terminate properly
This commit is contained in:
parent
0235a9d348
commit
fb8d8f354f
1 changed files with 7 additions and 0 deletions
7
index.js
7
index.js
|
|
@ -66,3 +66,10 @@ app.post('/url', function (req, res) {
|
|||
app.listen(app.get('port'), function () {
|
||||
console.log("Node app is running at localhost:" + app.get('port'));
|
||||
});
|
||||
|
||||
process.on('SIGINT', function () {
|
||||
process.exit();
|
||||
});
|
||||
process.on('SIGTERM', function () {
|
||||
process.exit();
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue