What is nodemon?

Answer

nodemon is a development utility tool that monitors your Node.js application for file changes and automatically restarts the server whenever changes are detected. Without nodemon, you would have to manually stop and restart Node.js every time you change a file during development. Install as a dev dependency: npm install --save-dev nodemon. Use it instead of node: nodemon app.js. Configure via nodemon.json or the nodemonConfig field in package.json to specify which file extensions and directories to watch, and which to ignore. Typically added to the dev script in package.json: "dev": "nodemon app.js". An alternative built into Node.js 18+ is node --watch, which provides similar file-watching functionality without an extra dependency.