Is anyone using sails.js in Webstorm?


I am new to Javascript, programming and Webstorm and I have been slecting some tools to build applications with and believe Webstorm with its awesome tools to help Node development (terminal, NPM and auto-complete) are the only way forward.  I am using sails.js as a MVC framework however I was wondering if anyone had experience with setting up a development environment with Webstorm and sails.js?  Alternatively if anyone has used other MVC frameworks with node I would be interested to here your thoughts?  The good, bad and ugly.



Hi Simon!

I'm new around here but I managed to set a sails project on WebStorm. You can do the following:

1. Open the directory with your sails project
2. Go to Run menu and click on Edit Configurations
3. Click on the + in the top left of the window and select Node.js
4. Edit the parameters like this (I'm on windows, linux should be close to this as well):
    - Name: whatever you like
    - Node interpreter: path to node installation (C:\Program Files\nodejs\node.exe on my PC)
    - Node parameters: leave empty, we don't need them for now
    - Working directory: should be your app directory
    - Javascript file: on Windows it should be %USERPROFILE%\AppData\Roaming\npm\node_modules\sails\bin\sails.js
    - Application parameters: lift

Hope this will get you started. For the other sails commands you'll have to get used to the command line, on windows the git shell will do just fine.



Thank you Stefan

This has been very helpful!  I am running on Windows so configuration is very similar to yours.  Can you please give me an example of your working directory as my path is set to project location on my computer?  I will keep you updated on my progress.  A new sailsJS release is due soon that will enable associates with models which will make it even better.  However the error handling does need some improving to make it more robust and efficient to use.  I like the features of Webstorm that make using node simple.



In case anyone is using sails.js on a Mac osx, here are the settings I use (in "Run" --> "Edit Configurations"):

  • Name: <whatever you like>
  • Node interpreter: /usr/local/bin/node
  • Node parameters:
  • Working directory: your app directory e.g. /Users/<yourName>/sails.js/activityOverlord
  • Javascript file: /usr/local/share/npm/lib/node_modules/sails/bin/sails.js
  • Application parameters: lift app.js

Please sign in to leave a comment.