Get Started with Nodejitsu

Share this article

Today we have Melbourne-based front end developer Mark Dalgleish talking about Nodejitsu, a simple Node.js platform. Watch to find out more.

Transcript

In this JumpCast, we’re going to look at deploying our note apps into the cloud, using the nodejitsu service. Now, one of the great things about Nodejitsu, is they have a free service to get you started, and it’s really painless to get up and running. The first thing to do is to go over to the terminal, and we’re going to use Node package manager, or NPM to install locally the jitsu package. Now what this is going to do, is going to the NPM registry, download the latest version of the nodejitsu command mine utility. With this, you’ll be able to sign up for nodejitsu account, then login to it and use it to interact with this servers, provisioning new websites, and uploading your node projects, so now that’s complete. Let’s clear the screen, and we can create an account by saying ‘jitsu Signup. It’s going to prompt you for some details to get your account sorted out, but I’m going to assume that you’ve gone through that process okay, and the next step, once you’ve got an account as you can say, is “jitsu login”. It’s going to ask you for your account details. Let’s just log in now. Once this has logged you in, every command you use, using the jitsu tool, is against your nodejitsu account. What we can do, first of all, is we want to have an application that we can actually upload to nodejitsu, so to do that, we’re first going to install Express, the Node application framework. Using Express, we’re just going to quickly scaffold up really basic app, something that can run on the nodejitsu servers. Now that we’ve got that, we can say “express jumpcast”; we’ll create a new application called jumpcast. If we cd into jumpcast, and open it in our editor. You’ll see we’ve got package js in file, with information about our new application. Let’s rename it to “JumpCast”, and we’ll be a bit more specific about those start scripts. Running NPM style will run node app.js. Running app.js will start out our express server, and hitting the default route is going to render the index views. If we look at the index.jade, you can see we’ve got our basic homepage here. If we change this from “title” or say, “jumpcast”, and we’ll say “nodejitsu with”. So we’ve modified our basic app, and from here, if we run NPM START, you’ll see our application fails to start. This is because we first need to install our dependencies, which are currently listed in the package js file. If we run NPM install, we’re going to download the dependences for our new application, which is Express and Jade. Once these are downloaded, we’ll be able to start our app using the NPM start script. First of all, it’s going to get the dependencies for Jade and Express, might take a few seconds, and that’s complete. We can run “NPM start”. This is the command that’s going to run on the server once we upload to nodejitsu, but for now, it’s running locally. If we go over to the chrome, go to local lost 3000, you can see our barebones application is up and running, so it’s ready to go. From here, we can close our application down. We can now deploy our app to nodejitsu. We run “jitsu deploy”. It’s going to ask us for some more details about our application, so we want to put it at jumpcast.jitsu. Ask us which version of node it can run on, 0.8 is fine. The default details it’s asked us all look good, so we’ll go with that. What it’s doing is it’s communicating with nodejitsu provisioning up new application for us, and it’s uploading a new application. In a few moments, what’s going to happen is on this server, it’s going to download the dependencies for our application. Then it’s going to start running on jumpcast.jit.su, so you can see right now, it’s starting our new application remotely. Then, in a few moments, we’ll be able to go and see this running live on the nodejitsu servers, where not only we can access it, but anyone else. Now, application’s up and running. If we go over to chrome, and we go to jumpcast.jit.su, you’ll see our application is now up and running. What you’ve seen is it basic example of how to get a node application created and uploaded to nodejitsu using an account that we’ve created from the command line, logged in, and then deployed it to this service. If you’d like to see more, definitely go to nodejitsu.com and have a look at their free service, and there’s also paid service if you’d like to get more serious with the cloud hosting on their system. Thanks for watching.

Frequently Asked Questions about Nodejitsu

What is Nodejitsu and how does it work?

Nodejitsu is a cloud-based hosting platform for Node.js applications. It provides a simple, user-friendly way to deploy, scale, and monitor your Node.js applications. Nodejitsu works by providing a command-line interface (CLI) tool called ‘jitsu’ that allows you to manage your applications directly from your terminal. You can use it to create new applications, deploy your code, manage databases, and much more.

How do I get started with Nodejitsu?

To get started with Nodejitsu, you first need to install the ‘jitsu’ CLI tool. This can be done using the Node Package Manager (npm) by running the command ‘npm install jitsu -g’. Once installed, you can use the ‘jitsu’ command to interact with the Nodejitsu platform. For example, ‘jitsu apps create’ will create a new application, and ‘jitsu deploy’ will deploy your application to the cloud.

How does Nodejitsu compare to other Node.js hosting platforms?

Nodejitsu stands out for its simplicity and ease of use. It provides a straightforward way to deploy and manage Node.js applications, with a focus on developer productivity. Unlike some other platforms, Nodejitsu provides a command-line interface that allows you to manage your applications directly from your terminal, without the need for a web interface.

Can I use Nodejitsu for free?

Nodejitsu used to offer a free tier for developers, but this is no longer the case. However, they do offer competitive pricing for their hosting services, with plans starting at just $9 per month.

What happened to Nodejitsu?

In 2015, Nodejitsu was acquired by GoDaddy. As part of the acquisition, Nodejitsu’s platform was integrated into GoDaddy’s existing services, and the Nodejitsu brand was retired. However, the ‘jitsu’ CLI tool and other open-source projects created by Nodejitsu are still available and maintained by the community.

How can I deploy my application using Nodejitsu?

Deploying an application with Nodejitsu is simple. Once you’ve created your application using the ‘jitsu apps create’ command, you can deploy your code using the ‘jitsu deploy’ command. This will upload your code to the Nodejitsu platform and start your application.

What databases does Nodejitsu support?

Nodejitsu supports a wide range of databases, including MongoDB, CouchDB, and Redis. You can manage your databases using the ‘jitsu databases’ command, which allows you to create, delete, and list your databases.

How can I monitor my application on Nodejitsu?

Nodejitsu provides built-in monitoring tools that allow you to keep track of your application’s performance. You can access these tools using the ‘jitsu logs’ command, which will show you the recent logs for your application.

Can I scale my application with Nodejitsu?

Yes, Nodejitsu provides easy-to-use scaling features. You can scale your application up or down using the ‘jitsu apps scale’ command, which allows you to add or remove instances of your application.

What is the ‘jitsu’ command-line tool?

Jitsu’ is a command-line interface (CLI) tool provided by Nodejitsu. It allows you to manage your Node.js applications directly from your terminal, without the need for a web interface. You can use it to create new applications, deploy your code, manage databases, and much more.

Ricky OnsmanRicky Onsman
View Author

Ricky Onsman is a freelance web designer, developer, editor and writer. With a background in information and content services, he built his first website in 1994 for a disability information service and has been messing about on the Web ever since.

Node-JS-ToolsNodejitsu
Share this article
Read Next
Get the freshest news and resources for developers, designers and digital creators in your inbox each week