How to use the nodemon.config function in nodemon

To help you get started, we’ve selected a few nodemon 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 alleyinteractive / irving / packages / core / cli / dev.js View on Github external
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.');
    });
  }
});
github atSistemas / angular-base / server / bootstrap / index.js View on Github external
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;

nodemon

Simple monitor script for use during development of a Node.js app.

MIT
Latest version published 1 month ago

Package Health Score

94 / 100
Full package analysis