Skip to content

nodemon

A wrapper for node that restarts your app automatically when files change.

Stars
26.7k
Forks
1.7k
Licence
MIT
Language
JavaScript
Last update
4 days ago
Type
Dev tool

What it is

nodemon is a command-line tool that watches the files in your project and restarts your Node.js application when they change. It is a replacement for the node command: you run your script with nodemon instead of node, and it needs no changes to your code. It is used during development so you do not have to stop and start the server by hand after every edit.

  • Run a server with nodemon server.js and have it restart each time you save a .js file
  • Type rs in the terminal to manually restart the process without stopping nodemon
  • Watch only certain folders with --watch or certain file types with -e js,pug
  • Ignore test files or fixtures with --ignore so saves to them do not trigger restarts
  • Run a Python script with nodemon --exec "python -v" ./app.py and restart it on .py changes

Great for

  • Node.js developers running a web server locally who want fast edit-and-reload cycles
  • Developers working on scripts in other languages such as Python or Ruby, using the execMap setting
  • Teams that want a simple, configurable file watcher without changing their code
  • Beginners learning Node.js who want changes to show up immediately

Not ideal for

  • Production servers, since the README presents nodemon as a development tool (the description says it is 'perfect for development')
  • Projects that need restarts triggered by something other than file changes, since the README describes file-change watching as its core behavior
Step-by-step guide: how to use nodemonInstall, first run, examples, tips and FAQs

How to get it

  1. 1

    Install with a package manager

    You'll need: Node.js · npm or yarn

    Install globally with npm

    npm install -g nodemon

    Install as a dev dependency

    npm install --save-dev nodemon
  2. 2

    Run it

    • Install nodemon globally with npm install -g nodemon, or add it to your project as a dev dependency
    • Run your app with nodemon followed by your script, for example nodemon ./server.js
    • Edit and save a watched file and confirm that nodemon restarts the process
    • Type rs and press Enter to restart manually at any time
  3. 3

    Get the most out of it

    • Create a nodemon.json file to set defaults such as ignore patterns, watched extensions, or verbose output
    • Use execMap in nodemon.json to add support for other languages you run regularly
    • Use --watch to limit which directories are monitored and speed up detection in large projects
    • Use nodemon --help config to see configuration options, as referenced in the README

Downloads

Strengths

  • No changes to your code or workflow are required; you just replace node with nodemon
  • Configurable through command-line flags, nodemon.json, or the nodemonConfig section of package.json
  • Works with non-JavaScript scripts through --exec and execMap

Trade-offs

  • The README is truncated and some configuration docs are said to 'need better documentation', so advanced setups may take research
  • Ignore patterns must be written as full-path globs (for example ** patterns), which the README notes is easy to get wrong
  • Designed for development use, not as a production process manager

How it compares

ProjectStarsTypeLevelUpdatedBest for
nodemon (this)26.7kDev toolbeginner4 days agoNode.js developers running a web server locally who want fast edit-and-reload cycles
tsx12.2kCLIbeginner1 months agoDevelopers who already use Node.js and want to run TypeScript scripts quickly
node-gyp10.7kDev toolintermediate9 days agoDevelopers publishing or installing Node.js packages that include native C/C++ code
nvm95.7kDev toolbeginner9 days agoDevelopers who work on several Node.js projects that need different versions
pnpm37kDev toolbeginner4 days agoDevelopers working in Node.js projects who want faster installs and less disk use
asdf25.6kDev toolbeginner5 days agoDevelopers who work on several projects that need different language versions

Stats synced from GitHub. The assessment above was drafted with AI from the project's README on 2026-10-29 and may miss recent changes — check the README before relying on a command. MIT licence: free to use, modify and distribute, including commercially, as long as you keep the copyright notice.