const forever = require('forever-monitor');

const child = new forever.Monitor('copy.js', {
    max: 10000,
    silent: false,
});

child.on('exit', function () {
    console.log('copy.js has exited after 3 restarts');
});

child.start();  