Nodejitsu, founded in April 2010, is a platform as a service (PaaS) company based out of New York City. Nodejitsu provides a set of command-line tools that are used to deploy applications to their cloud. To begin using Nodejitsu, you must first register for an account at www.nodejitsu.com. Although signing up is free, deploying your application is not.


Nodejitsu will provide you with a free 30-day trial, but after that you have to pay a minimum of $9 per month (at the time of this writing) to host your application.

After signing up, you’ll need to install Nodejitsu’s command-line tool, jitsu. jitsu can be installed using the command npm install -g jitsu. During account creation, you will receive an e-mail with instructions on creating a jitsu account. The instructions include a command similar to the one shown below. After entering the command e-mailed to you, your account will be created, and you will be prompted to create an account password.

Generic Command that Confirms a jitsu Account

$ jitsu users confirm username confirmation_code

Next, create a Node application as you normally would. To deploy your project to Nodejitsu, it must contain a package.json file. Next, issue the command shown below from within your application’s directory.

$ jitsu deploy

If your project does not contain a package.json file, jitsu will create one for you by stepping you through a short wizard. The package.json file should include the name, version, scripts, engines, and subdomain fields. The engines field should contain a node field to specify the required version of Node. Similarly, the scripts field should contain a start script so that Nodejitsu knows how to initialize your application. The subdomain will be used in your application’s URL, and must be unique. An example package.json file suitable for jitsu deployment is shown below. Notice that the subdomain shown in this example includes a username (abhi) to help ensure that the string is unique.

{
   "name": "simple-server",
   "subdomain": "simpleserver.abhi",
   "scripts": {
      "start": "simple-server.js"
   },
   "version": "0.0.1",
   "engines": {
      "node": "0.10.x"
   }
}

If everything is configured properly and your desired subdomain is available, your application will be deployed to Nodejitsu’s cloud. To access your application, visit http://subdomain.jit.su, where subdomain is the value found in the package.json file.

Share Button

Leave a Reply

Your email address will not be published. Required fields are marked *

Post Navigation