I would like to use nodemon from within the WebStorm IDE (version 7). Nodemon watches one or more files in my source folder and restarts the node process (an Express server in this case), when one of the source files changes.
How do I configure WebStorm to use nodemon in a Run Configuration, so that the node process is automatically restarted?
Without nodemon, I use the following configuration in WebStorm, but have to restart the node process whenever I change something in the source file:
- Node interpreter:
/usr/local/bin/node
- Working directory:
/Users/foo/test
- JavaScript file:
server.js
This results in a Run Configuration that runs node server.js
in the specified directory.
From command line, I can use the following command to use nodemon to watch for file changes: nodemon server.js
in the project directory.
How do I need to change the WebStorm configuration so that it also uses nodemon?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…