juanpastas juanpastas - 1 year ago 199
Javascript Question

Reload Express.js routes changes without restarting server

I tried

, but it just reloaded view files.

Should I use another tool, or this one can be configured to watch for my
file which runs the server?

I read that options are the same as
, and default for watched files include

Any URL you know with a simple configuration?

My main problem is how to setup good development environment for Express.js, and I would like to inspect the variables when I am making a request, is painful to restart each time I make a change in a route.

PS I tried
to inspect variables when server handles a request, but it seems
is not intended for that, right?

Answer Source

I think Nodemon has what you're looking for.

Nodemon is a utility that will monitor for any changes in your source and automatically restart your server. Perfect for development.

Example invocation:

nodemon index.js
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download