Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function stop() {
var forever = require('forever'),
fsx = require('fs-extra');
console.log('Stopping Lazo!...');
if (fsx.existsSync(lazoPath + '/lazo.pid')) {
try {
forever.stop('lib/server/app.js', true);
forever.cleanUp();
fsx.remove(lazoPath + '/lazo.pid');
console.log('Lazo! stopped');
} catch (err) {
console.log('Error stopping Lazo!');
process.exit(1);
}
}
}