11

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.

Martijn Pieters
  • 889,049
  • 245
  • 3,507
  • 2,997
Rick
  • 15,305
  • 33
  • 106
  • 160

2 Answers2

11

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.

Dave Jensen
  • 4,444
  • 1
  • 38
  • 43
2

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.

Fity
  • 31
  • 3