Sitelet https://web.archive.org/web/20201203122458/https://github.com/Thann/nodemon
Skip to content
nodemon
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 

README.md

nodemon

Auto-restart node apps! (simpler alternative to the original nodemon)

npm install thann/nodemon

if (require('nodemon')()) return;

And your app will restart on any changes to the folder it's in!

This is just a wrapper for chokidar.watch(...), so you can pass any of those options.

CLI

You can also run arbitrary commands in the terminal like this:

$ nodemon echo cool

Advanced

const watcher = require('nodemon')(
  __dirname, // folder to watch
  {          // chokidar options
    ignored: /.*\/node_modules\/.*/
  },
  {          // library options
    killSignal: 'SIGTERM'
  }
);
if (watcher) {
  watcher.on('change', f => console.log('----- changed:', f));
  return;
}

See test.js for an example app.

About

Auto-restart node apps!

Topics

Resources

License

Releases

No releases published

Packages

No packages published
You can’t perform that action at this time.