🚀 Express.js
Beginner
What is Nodemon and why is it useful with Express?
Answer
Nodemon is a development tool that monitors your Node.js project files for changes and automatically restarts the server when a change is detected. Without it, you must manually stop and restart the server after every code change. Install as a dev dependency: npm install --save-dev nodemon. Run your app: npx nodemon app.js or define a script in package.json: "dev": "nodemon app.js". Configure it via a nodemon.json file to ignore specific files or watch additional extensions. In production, Nodemon is not used — use a process manager like PM2 for restart-on-crash, clustering, and monitoring.
Previous
What is the difference between app.listen() and http.createServer()?
Next
How do you implement JWT authentication in Express.js?