Node.js · Junior · Question 8 of 75
What does node --watch app.js do?
- 1Runs the file in the browser
- ✓Correct answer: Restarts the process automatically when the file or its imports change
- 3Prints every function call to the console
Explanation
Watch mode is built into Node.js, so tools like nodemon are often no longer needed for simple cases. --watch-path limits which paths are watched.