Setting up a node.js workflow
I have imported an existing node.js express app into WebStorm. The autocompletion and the git features are really great and easy to use. Now I am trying to optimize my workflow. Before, to deploy and test the nodejs express app I had to:
- Stop the currently running nodejs server, by typing "Ctrl-C" in the command line
- run gulp in the command line
- cd to the distribution folder
- run a script that launches the project
So nothing complicated, but I would like to automate this, as I am running the same set of commands through the terminal in Webstorm. I have tried using macros, but they haven't worked for me because I need to click on the terminal to apply the text macros.
Any advice would be appreciated.
Please sign in to leave a comment.
You can actually do everything using Gulp (stop your script, do your build tasks, run the script from distribution folder). See https://gist.github.com/webdesserts/5632955, for example.
Once you set up your Gulp build, you can run it in one click from the IDE, using either Gulp tool window or Gulp run configuration