Monday, May 20, 2024
 Popular · Latest · Hot · Upcoming
51
rated 0 times [  54] [ 3]  / answers: 1 / hits: 109940  / 8 Years ago, wed, january 18, 2017, 12:00:00

I know how to do nodemon server.js but what if I want to do nodemon ./src



I want restart node on any changes in the directory of src.



When I do above and it say cannot find module babelpracsrc



I am also doing in another command window : npm run scripts:watch



The script is



scripts : {
scripts : babel src --source-maps-inline --out-dir dist,
scripts:watch : babel src --watch --source-map-inline --out-dir dist
},


That runs the watch but I want to run the script in src or dist to see the console.logs



I aslo tried nodemon --watch ./src. It says it can't find index.js.



I am on windows 7



My working directory is babelprac


More From » node.js

 Answers
9

Nodemon expects it just as:



nodemon --watch src server.js



https://github.com/remy/nodemon#monitoring-multiple-directories




nodemon --watch app --watch libs app/server.js



[#59299] Tuesday, January 17, 2017, 8 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
deiong

Total Points: 15
Total Questions: 103
Total Answers: 99

Location: Sudan
Member since Thu, May 7, 2020
4 Years ago
;