Преглед изворни кода

Merge branch 'master' of github.com:RobinLinus/snapdrop

RobinLinus пре 4 година
родитељ
комит
4949338669
1 измењених фајлова са 13 додато и 0 уклоњено
  1. 13 0
      server/index.js

+ 13 - 0
server/index.js

@@ -1,3 +1,16 @@
+var process = require('process')
+// Handle SIGINT
+process.on('SIGINT', () => {
+  console.info("SIGINT Received, exiting...")
+  process.exit(0)
+})
+
+// Handle SIGTERM
+process.on('SIGTERM', () => {
+  console.info("SIGTERM Received, exiting...")
+  process.exit(0)
+})
+
 const parser = require('ua-parser-js');
 const { uniqueNamesGenerator, animals, colors } = require('unique-names-generator');