当前位置: 动力学知识库 > 问答 > 编程问答 >

javascript - 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.

网友答案:

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

分享给朋友:
您可能感兴趣的文章:
随机阅读: