nodemon doesn't seem to be working as expected. I start it from a Makefile that looks like this (I use foreman to load my .env
file):
watch:
./node_modules/.bin/nodemon --exec foreman -- run ./scripts/test.sh
And it runs tests for all directories in packages/
(each have their own node_modules/ directory). So I would like to make sure that nodemon ignores packages/*/node_modules
and also make sure it monitors all .js files in packages/*/
. What's the best way to get more info out of nodemon?
Ok, apparently there is a --verbose
flag. Reduced the amount of files watched with --ignore "packages/*/node_modules"
. It is still a bit slow (seems to be eating my CPU). Is there any way to get a better performance on OS X?
Also can nodemon understand foreman .env files? It seems nodemon picks up file changes but won't restart the underlying exec'd process.
There's --verbose
which gives you more output. For debugging you can also set the env value of DEBUG=nodemon,nodemon:*
and it will list exactly what it's watching.
Re: .env
files, no, that's specific to foreman, but I thought that foreman would push all those env values into the shell it runs nodemon in, and nodemon will pass all those to the node instance.
Most helpful comment
There's
--verbose
which gives you more output. For debugging you can also set the env value ofDEBUG=nodemon,nodemon:*
and it will list exactly what it's watching.Re:
.env
files, no, that's specific to foreman, but I thought that foreman would push all those env values into the shell it runs nodemon in, and nodemon will pass all those to the node instance.