DIY Nodemon

Alex Mills
Feb 24, 2017 · 1 min read

Nodemon is a great tool to restart your Node.js server upon changes to source code. Usually it works great, but today it was acting up and after spending a half hour trying to fix, I thought, F-it, this shouldn’t be that hard to write from scratch.

If you have similar problems, try this out. Will probably turn this into yet another NPM module.

I recommend taking this file, putting it in the root of your project, and calling it “dev-server.js”.

You can run it with ./dev-server.js, since it has the hashbang.

Enjoy.

I did write an NPM module. I think anyone interested should just use the above script and make it their own, but if you want to see what it looks like as an NPM module, it’s a little less sleek because it has to be more generic:

https://github.com/ORESoftware/roodles

Alex Mills

Written by

Programmer. Soccer, bicycle, and 90's hip hop enthusiast. Likes movies about music, stand-up comedy. Pronounces LaTeX latex and Technics technicks.

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade