Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
nodemon.on('crash', () => {
// When an error has occurred on the server, wait for any change in the
// project to restart the app.
if (isIgnoreApplied(nodemon)) {
nodemon.config.load({ script }, () => {
utils.log.info('Nodemon is temporarily watching all directories for a' +
' file change to resolve the error.');
});
}
});
nodemon.on('start', function () {
}).on('quit', function () {
base.console.info("Development server has exited");
}).on('restart', function (files) {
console.log(base.console.symbols.CR);
base.console.info('Restarting server due to changes on the following files:' + base.console.symbols.CR);
if (Array.isArray(files)) {
files.forEach((file) => console.log(` ${file}`));
} else {
console.log(` ${files}`);
}
console.log(base.console.symbols.CR);
});
config = nodemon.config;
} else {
config = require(`./${ENV}`);
}
module.exports = config;