liveBook · Manning

Nodemon

As explained in Bootstrapping Microservices, Second Edition: With Docker, Kubernetes, GitHub Actions, and Terraform

nodemon is a command-line development tool that monitors files and automatically restarts a Node.js application when changes are detected.

nodemon is a Node.js development tool that watches project files and automatically restarts a running application after code changes. This shortens the loop between editing and testing, enabling faster feedback during development and testing. section 2.6.8

Set up nodemon as a development-only workflow:

  • Install it with npm install --save-dev nodemon so production installs can omit it. section 2.6.8
  • Use npm run start:dev for a consistent command across microservices. section 5.5.2

Development script

A Node.js service can keep production and development commands separate: start runs node ./src/index.js, while start:dev runs nodemon ./src/index.js. In WSL2 or a virtual machine, add --legacy-watch to use polling when filesystem watching does not pass host changes through. section 5.5.2

How Bootstrapping Microservices, Second Edition: With Docker, Kubernetes, GitHub Actions, and Terraform covers it

How deep it goes
Explains installation, npm integration, file watching, automatic restart, and polling fallback without detailing watcher internals.
Examples
Uses npx nodemon, start:dev scripts, package.json configuration, and --legacy-watch for WSL2 or virtual-machine development.
What it assumes
Assumes a Node.js project with npm and an executable application entry point; teaches live reload setup from installation onward.
What you can do after
Operate live reload through npm scripts and configure polling when filesystem watching fails across development environments.
How it connects
Connects live reload with Node.js, npm scripts, development dependencies, Docker Compose, WSL2, and virtual machines.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Bootstrapping Microservices, Second Edition: With Docker, Kubernetes, GitHub Actions, and Terraform. The section links point to the parts of the book it draws on.