Reload Express.js routes changes without manually restarting server

前端 未结 3 1434
没有蜡笔的小新
没有蜡笔的小新 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 18:59

    I use express.js, normally start server by

    npm start
    

    with Nodemon installed, I use

    nodemon --exec npm start
    

    Note: nodemon app.js will NOT work here,

    because express.js use start script

提交回复
热议问题