Nodemon restart twice when change is made

安稳与你 提交于 2020-01-06 11:47:33

问题


I am using nodemon in order to restart the app when change is made. It works good however it restart two times and thus sometimes it is a bit busy to read data returned from server (like console.log) since its reloaded twice.

I am talking about something like this:

[nodemon] starting `node app.js`
Connected to db and listening on port 8080
[nodemon] restarting due to changes...
[nodemon] starting `node app.js`
Connected to db and listening on port 8080

I am working with Atom IDE.

If this question is missing information, please comment and I will update in case its not fully informative.

Thank you for support.


回答1:


Possible Solution:

I would start by looking into the set of files/directories nodemon is watching. It may be currently configured to watch two different server files which is why it would restart twice for a single file change. If this is true for you, the solution is as simple as changing your config in order to manage only one extension.



来源:https://stackoverflow.com/questions/48505213/nodemon-restart-twice-when-change-is-made

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!