How to Restart Your Node App Without Nodemon
Advertisement
On this page
If you’ve built anything with Node.js, you’ve probably used nodemon to automatically restart your app when files change. It’s been a go-to developer tool for years — but did you know you no longer need it?
With Node.js 18.11 and above, there’s a built-in --watch option. It tells Node to monitor your source files and automatically restart the process when changes are detected.
node --watch app.jsBashThat’s it. No configuration, no dependencies, no waiting for external tools to kick in.
It works great when:
- You’re building small or medium apps.
- You don’t need advanced features like custom delay or file filters.
- You want to keep your environment minimal and lean.
Keep in mind that, large projects with complex file structures might still benefit from nodemon or more advanced tools.
Never miss a tutorial
Practical coding tips delivered to your inbox every week.
No spam · Unsubscribe anytime
Advertisement
