问题描述
我尝试了 express-livereload
,但它只是重新加载了视图文件。
I tried express-livereload
, but it just reloaded view files.
我是否应该使用其他工具,或者这个可以配置为监视运行服务器的 index.js
文件?
Should I use another tool, or this one can be configured to watch for my index.js
file which runs the server?
我读过那个选项与 node-livereload
相同,监视文件的默认值包括 .js
文件。
I read that options are the same as node-livereload
, and default for watched files include .js
files.
您使用简单配置知道的任何URL?
Any URL you know with a simple configuration?
我的主要问题是如何为Express.js设置良好的开发环境,以及我想在我提出请求时检查变量,每次在路线上进行更改都会很难重启。
My main problem is how to setup good development environment for Express.js, and I would like to inspect the variables when I am making a request, is painful to restart each time I make a change in a route.
PS我试过 node-inspector
在服务器处理请求时检查变量,但似乎 node-inspector
不适用于此,对吧?
PS I tried node-inspector
to inspect variables when server handles a request, but it seems node-inspector
is not intended for that, right?
推荐答案
我认为有你想要的。
示例调用:
nodemon index.js
这篇关于重新加载Express.js路由更改,而无需手动重新启动服务器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!