Jelajahi Sumber

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

RobinLinus 4 tahun lalu
induk
melakukan
4949338669
1 mengubah file dengan 13 tambahan dan 0 penghapusan
  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');