https://github.com/isaacs/node-supervisor在node-supervisor中,如何查看目录中的所有更改?
我想观看“api”目录及其所有子目录(递归)中的所有内容。我怎样才能做到这一点?
sudo supervisor -w app.js,api app.js
这似乎不起作用。它只监视“api”目录,而不是其子目录。
https://github.com/isaacs/node-supervisor在node-supervisor中,如何查看目录中的所有更改?
我想观看“api”目录及其所有子目录(递归)中的所有内容。我怎样才能做到这一点?
sudo supervisor -w app.js,api app.js
这似乎不起作用。它只监视“api”目录,而不是其子目录。
似乎正在工作,并检测到我的变化。
如果我用这个来加载文件:
var module = require("./folder/test/variables.js")
,有一个主节点文件:
var module = require("./folder/test/variables.js")
var http = require('http');
http.createServer(function (request, response) {
response.writeHead(200, {'Content-Type': 'text/plain'});
response.end('The variable is '+ module.variable)
}).listen(7777);
然后,只需使用:
supervisor myApp.js
是要检测文件夹/测试/变量的变化,这是一个子文件夹。
事实上,主管说,这是监测当前文件夹:
DEBUG: Running node-supervisor with
DEBUG: program 'myApp.js'
DEBUG: --watch '.'
DEBUG: --extensions 'node|js'
DEBUG: --exec 'node'
它也重装文件夹中的文件/测试,如果我使用:
supervisor -w folder myApp.js
所以,我想你可能有一个不同版本的主管?我使用0.2
我只是看我使用所有的扩展:
supervisor -e 'js|ejs|less' app.js
为**所有扩展**,你可以使用'主管-e“” app.js' – Falcon
不知道这是否可用4年前:) – chovy