k1ndva
Last Updated: February 25, 2016
·
2.641K
· sawanoboly

Deploying node.js project using capistrano.

gem install capistrano-node-deploy

and modify Capfile below.

require "capistrano/node-deploy"
# load 'deploy'
-- snip --

Tasks for node.js project.

cap node:createctlscrpts     # Create controlscripts for monit and others
cap node:createupstartconfig # Disable defaut task: Create upstart script f...
cap node:install_packages      # Check required packages and install if packa...
cap node:start                 # Start the node application
cap node:stop                  # Stop the node application
</code></pre>

Some tasks are rewritten in capistrano/node-deploy for node.js deploying. 
For example, deploy:setup,deploy:symlink.

Of course recommend to override some tasks for your environments.