39100fb
1
2
3
4
5
6
7
8
9
10
11
const cp = require('child_process'); start = () => { var child = cp.fork(__dirname + '/server.js'); child.on("close", () => { console.log("Restarting...") setTimeout(() => start(), 250) }); }; start();