How to use the forever.restartAll function in forever

To help you get started, we’ve selected a few forever examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github jaystack / jaydata / JayService / cu.js View on Github external
child_process.exec('service nginx restart', function(err, stdout, stderr){
            if (err) throw err;
            if (stdout) console.log(stdout);
            if (stderr) console.log(stderr);
            
            process.env.HOME = config.subscriberPath;
            forever.restartAll().on('error', function(err){
                next(err);
            });
            
            console.log('CU ready.');
            res.end();
        });
    });

forever

A simple CLI tool for ensuring that a given node script runs continuously (i.e. forever)

MIT
Latest version published 2 years ago

Package Health Score

56 / 100
Full package analysis