Develop and deploy a Node.js app

Last updated: 30 December 2015

Time: 15 minutes

IBM® Bluemix™ is an open-standards, cloud-based platform where you can build, manage, and run all types of apps: mobile, smart devices, web, and big data. The Bluemix capabilities include Java™, mobile back-end development, app monitoring, and features from ecosystem partners and open source, all through an as-a-service model in the cloud.

In this tutorial, you create an app in Bluemix by using the SDK for Node.js starter pack. You then create a Git repository for the app and push changes to that repo from the IBM® Bluemix™ DevOps Services Web IDE.

If you want more information about Bluemix, see Getting Started with Bluemix and Bluemix Overview.

If you're ready to try Bluemix, start this tutorial!

Before you begin

To do this tutorial, you need a Bluemix account. Bluemix accounts provide access to everything you need to develop, track, plan, and deploy apps. You can sign up for a free 30-day trial.

Create an app in Bluemix

  1. Sign in to Bluemix. The Dashboard opens: Bluemix Dashboard The Dashboard shows an overview of the active Bluemix space for your organization. By default, the space is dev and the organization is the user name of the person who created the project. For example, if logs in to Bluemix for the first time, the active space is dev and the organization is If you create more organizations or spaces in Bluemix, use the same ones as you follow the tutorials. Use the default selections.

  2. Click CREATE AN APP. For the kind of app that you are creating, click WEB.

  3. For your starter, click SDK for Node.js. Review the docs and details, and then click CONTINUE.

  4. Name your app and then click FINISH. The name is a unique URL where you access your app. After a moment, the app starts. The app's Overview page opens and shows that the app is running. Bluemix Application tile

Now that your app is running, you can see and modify its code by using DevOps Services.

Set up Git integration and auto-deploy in DevOps Services

You can work with your app's code in many ways. For example, with auto-deploy, you can modify the code that runs in your app by pushing your changes to a Git repository. You can auto-deploy your code if you use the Build & Deploy capabilities of DevOps Services.

  1. To enable auto-deploy, go to your app's Overview page on the Bluemix Dashboard and click ADD GIT. A Git repository is created and is populated with example code and a deployed app. You might be prompted to enter your password to verify that DevOps Services can act on your behalf. Add Git button

  2. Make sure that the Populate the repository with the starter application package and enable build and deploy check box is selected. Create Git repo dialog You created a Git repository, populated it with the example code, and deployed the app. Git repo success message dialog

  3. Go to the app's Overview page and click EDIT CODE. Your new project opens in the web integrated development environment (Web IDE).
    CODE button

Push changes to the Git repository by using the Web IDE

The integrated Web IDE is based on the Eclipse Orion open-source project. Orion at Bluemix DevOps Services

You can edit files with syntax coloring support for multiple languages, including HTML, CSS, JavaScript, Ruby, and Python. For some languages, such as JavaScript, the Web IDE also supports syntax checking and code completion, both for standard language constructs and for the services that Bluemix provides. To use content assist, press Ctrl+Space. For example, this image shows code completion for the standard Node.js express module. Orion showing express completions

To make a change to a file and then push the change, follow these steps:

  1. In the directory, find a file to modify; for example, public/index.html.

  2. Edit the file in the editor. Orion editing index

  3. Push the change by using the integrated Git support.

    a. From the leftmost menu, click the Git Repository icon Git Repository icon.

    b. Select check box for the changed file. Orion Git staging c. Type a commit message, and then click Commit. Orion Git commit d. In the Outgoing section on the left, click Push. Orion Git push

  4. To verify that your code was deployed, click BUILD & DEPLOY and wait until you see an indication that the app was deployed again. On the Deploy stage, in the LAST EXECUTION RESULT section, click the URL link under the app's name. Clicking the web app's URL

Your update is shown. Our really cool app


You have a good overview of how to get started with Node.js in Bluemix and DevOps Services.

You saw how to create and run a Node.js web app by using Bluemix. With one click, you created a Git repository, populated it with example code, and automatically deployed the app. You changed the code and pushed the changes to the Git repository by using the Web IDE. Then, you automatically built and deployed your changes, checked the deployment status, and verified your changes.

Next steps

Learn more about testing your app as you develop by using Bluemix Live Sync.