admin管理员组文章数量:1287612
I want to watch everything inside the "api" directory and all its subdirectories (recursively). How can I do that?
sudo supervisor -w app.js,api app.js
This doesn't seem to work. It only watches the "api" directory, not its subdirectories.
https://github./isaacs/node-supervisor
I want to watch everything inside the "api" directory and all its subdirectories (recursively). How can I do that?
sudo supervisor -w app.js,api app.js
This doesn't seem to work. It only watches the "api" directory, not its subdirectories.
Share Improve this question asked Nov 23, 2011 at 1:57 user847495user847495 10.2k17 gold badges47 silver badges48 bronze badges2 Answers
Reset to default 10I just watch all extensions I'm using:
supervisor -e 'js|ejs|less' app.js
Seems to be working and detect changes for me.
If I use this to load the file:
var module = require("./folder/test/variables.js")
And Have a main node file:
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);
Then, just using:
supervisor myApp.js
is going to detect changes in folder/test/variables, which is a subfolder.
Actually, supervisor says it is monitoring the current folder:
DEBUG: Running node-supervisor with
DEBUG: program 'myApp.js'
DEBUG: --watch '.'
DEBUG: --extensions 'node|js'
DEBUG: --exec 'node'
It is also reloading the files in folder/test if I use:
supervisor -w folder myApp.js
So, I guess you may have a different version of supervisor ? I am using 0.2
本文标签: javascriptIn nodesupervisorhow do I watch everything in a directory for changesStack Overflow
版权声明:本文标题:javascript - In node-supervisor, how do I watch everything in a directory for changes? - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1741317374a2371996.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论