Shai UI
Shai UI

Reputation: 51928

Node.js don't restart server when changing .js files?

I'm currently using node-supervisor so that node picks up .js changes, it works good but I've noticed it restarts the server everytime I save a js file. Is there a way to save a server-side .js file but not restart the server, yet have the changes automatically loaded into node? I.e., the process won't exit but somehow just update itself with the new changes.

Upvotes: 3

Views: 543

Answers (1)

GiveMeAllYourCats
GiveMeAllYourCats

Reputation: 888

You cannot load code in in real-time because of the complications you would get (for example memory leaks), But in theory you should be able to do this with modules.

You could have a look at this: livenode, It is not recommended to use in production environment though

Upvotes: 2

Related Questions