How to use the forever.load 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 musiqpad / mqp-server / server-package.js View on Github external
this.start = function() {
    if(this.settings.config) {
      fs.writeFileSync('./config.hjson', this.settings.config, 'utf8');
    }
		if (this.settings.forever.enabled) {
			forever.load(this.settings.forever.options);
			that.pid = forever.start('./start.js');
		}
		else {
			that.proc = runScript('./start.js', function (err) {
				if (err) throw err;
			});
		}
	};

forever

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

MIT
Latest version published 3 years ago

Package Health Score

58 / 100
Full package analysis