Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
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;
});
}
};