Get started with Bluemix and Bluemix DevOps Services using Node.js
Last modified: 21 April 2015
Time: 30 minutes
- Learning objectives
- Before you begin
- Create an app with Bluemix
- Set up Git integration and auto-deploy
- Push changes to the Git repository by using the Web IDE
- Next steps
- Create an app in IBM® Bluemix™ by using the SDK for Node.js starter pack.
- Create a Git repository for the app.
- Push changes to the Git repository from the IBM® Bluemix™ DevOps Services Web IDE.
Before you begin
Sign up for DevOps Services. When you sign up, you'll create an IBM id, create an alias, and register with Bluemix.
Create an app with IBM Bluemix
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.
You can find helpful information on the Bluemix website:
To get started now, try this tutorial. You'll create an app and deploy it.
Sign in to Bluemix. The Dashboard opens: The Dashboard shows an overview of the active Bluemix space for your organization. By default, the space is
devand the organization is the user name of the person who created the project. For example, if
email@example.com in to Bluemix for the first time, the active space is
devand the organization is
firstname.lastname@example.org. If you create more organizations or spaces in Bluemix, use the same ones as you follow the tutorials. Use the default selections.
Click CREATE AN APP. For the kind of app that you are creating, click Web.
For your starter, click SDK for Node.js. Review the docs and details, and then click CONTINUE.
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.
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.
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.
Make sure that the Populate the repository with the starter application package and enable build and deploy check box is selected. You created a Git repository, populated it with the example code, and deployed the app.
Go to the app's Overview page and click EDIT CODE. Your new project opens in the web integrated development environment (Web IDE).
Push changes to the Git repository by using the Web IDE
The integrated Web IDE is based on the Eclipse Orion open-source project.
In the directory, find a file to modify; for example,
Edit the file in the editor.
Push the change by using the integrated Git support.
a. From the leftmost menu, click the Git Repository icon.
b. Select the changed file: c. Add a commit message and commit the changes: d. Push the changes:
To verify that your code was deployed, click BUILD & DEPLOY and wait until you see an indication that the app was deployed again. In the Deploy stage, under LAST EXECUTION RESULT, click the URL link that is below the app's name.
Your update is shown.
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.
After you have completed this tutorial, learn more about testing your application as you develop by using Bluemix Live Sync.
© Copyright IBM Corporation 2013, 2015.