Reload Express.js routes changes without manually restarting server

前端 未结 3 1410
没有蜡笔的小新
没有蜡笔的小新 2020-12-30 18:54

I tried express-livereload, but it just reloaded view files.

Should I use another tool, or this one can be configured to watch for my index.js

3条回答
  •  孤城傲影
    2020-12-30 19:10

    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
    

提交回复
热议问题