16 June, 2014

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
    1402923309 full

And Bob’s you’re uncle!
1402923780 full

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:

1404050005 full


Tags: , ,