Getting WebStorm to use nodemon

Another note to self post. When writing node.js projects in WebStorm one of the major upsides is the debugging story. To hook that up you just create a configuration for it. One annoying thing I’ve encountered is that it does not restart the server/app after a crach or a save of the code-files.

In the command-line I’ve done this using nodemon and supervisor. I tend to prefer nodemon, so below I will show this using nodemon but it should work without problems using supervisor or any simular tool.

First of all install nodemon globally

npm install nodemon -g

Then enter WebStorm, open your node.js project and:

1. Hit the configuration menu to edit configuration if you don’t have one otherwise chose you’re existing config
2. If you don’t have a config, create it using the plus (+) sign
3. Change the path from node to nodemon

And Bob’s you’re uncle!

UPDATE 2014-06-29

That setup did not work as well as I hope, so I changed it around a little. Seems to work better:

2 thoughts on “Getting WebStorm to use nodemon

  1. For windows users set :
    Node Interpreter: Path of the node.exe i.e. c:\program files\node\node.exe
    Node parameter: C:\Users\YOURUSER\AppData\Roaming\npm\node_modules\nodemon\bin\nodemon.js

Kommentera

E-postadressen publiceras inte. Obligatoriska fält är märkta *