I'm using WebStorm as my node IDE and love it overall but I haven't been able to figure out how to use node supervisor when running node through WebStorm. Has anyone gotten this to work? I think I'm just not sure how to pass through the supervisor
argument so that it uses this when starting the node file.
WebStorm, using Node Supervisor (so do not have to restart after each code change)?
3.7k Views Asked by Rick At
2
There are 2 best solutions below
1

Install supervisor globally: npm install -g supervisor
WebStorm/IntelliJ run configuration for non-debug:
Name: supervisor app.js
Path to node: <same>
Node Parameters: /usr/local/lib/node_modules/supervisor/lib/cli-wrapper.js --exec /usr/local/bin/node --no-restart-on exit
Working directory: <same>
Path to Node App JS File: app.js
These paths are for Mac OS X 10.8 so you'll have to replace the above paths with paths on your machine. Next, you'll be able to run this in debug mode but it doesn't step through the code.
For debugging you can either use the remote debugger or just have a different run target for debugging without using supervisor.
It is amazing that I reach the goal by simply changing the path of node to the path of supervisor. So, I think this will also work for you.
Ps. I'm using WebStorm version 6.0.1.