Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Do I have to reload app.js every time I make a small change?

Tags:

node.js

When I start up my application in node.js

node app.js

and then make a change in app.js file, I have to exit node.js and restart it in order for this change to show up in my browser.

Is node.js caching the file at startup? Is there a way to avoid this, at least in development mode?

like image 609
Kay Pale Avatar asked Dec 12 '22 20:12

Kay Pale


1 Answers

Modules are cached when they are required. Take a look at http://github.com/isaacs/node-supervisor as a solution to your problem.

like image 98
thatismatt Avatar answered May 24 '23 22:05

thatismatt