A full featured Platform as a Service

Dependable Node.js clouds

Getting Started

Nodejitsu provides a tool called Jitsu that makes deploying an Node.js application super simple. You can install Jitsu with npm, the node package manager. You don't have to worry about installing npm since it comes bundled with Node.js.

      $ npm install jitsu -g
      

Jitsu is a client to the Nodejitsu HTTP API. If you are familiar with cURL you can use that as well to call our API:

      $ curl http://api.nodejitsu.com/users/new-nodejitsu-user/available
      { "available" : true }
      

This checked if the username "new-nodejitsu-user" is available.

If you still don't have a Nodejitsu account you can use Jitsu to sign up.

jitsu signup

You can now use Jitsu to login.

jitsu login username password

Your system is now ready to deploy an application.

Let's for example deploy the Hello World Node.js snippet:

      var http = require('http');
      http.createServer(function (req, res) {
      res.writeHead(200, {'Content-Type': 'text/plain'});
      res.end('hello, i know nodejitsu\n');
      }).listen(8080);
      

This application uses no external libraries other than the ones in Node.js core. In a real life scenario you are more likely to use a web application framework such as flatiron.js.

You can download this application directly from Jitsu:

mkdir hello cd hello jitsu install helloworld

The code snippet listed above is available in bin/server.

Jitsu follows conventions used in npm and it is able to understand how to start your application by reading the package.json file you can find in your current directory.

You can now deploy your application:

      $ jitsu deploy
      

Jitsu will ask you for two properties that are missing from your package.json file: subdomain and engines (Node.js).

Subdomain is where your application will be deployed, e.g. if you set it to "my-first-nodejitsu-app" your application will be available at http://my-first-nodejitsu-app.jit.su.

The engines field sets the Node.js version you want to run.

After your first Jitsu deploy feel free to take a peek at your package.json and see what changed.

jitsu deploy

The application is now available at the subdomain you choose. You have deployed your very first Node.js application. Yay!

jitsu deploy

We hope you continue to do many deployments with Nodejitsu. You can manage your application at our develop site, or by using Jitsu.

You can continue learning about Node.js by browsing to our docs site!