Creating a Node.js application for BlueMix from scratch
Summary of features covered:
- Auto generation of required files to enable new projects to quickly be added to BlueMix
- Easily fill in the cloud deployment information via wizards
- Easily allow the user to visit the URL of the project once it's on BlueMix
- Republish a project (that is, make a change and have it reflected without removing the application and then adding it back again)
- Allow the user to update existing cloud deployment information via the Applications Editor page
- Ability to remove the application from BlueMix
2. This project is empty and the user cannot add this application to BlueMix, until a facet is added to this project
Right click on the HelloWordlNode project > Properties > Project Facets
3.Click on "Convert to faceted form..." and select "Node.js Application"
4. Press OK
2 files will be generated if they don't already exist:
5.Right click on the BlueMix server > Add and Remove.HelloWorldNode to the right panel and click finish.
6. the deployment information wizards will now come up. This will enable the user to specify their application name and buildpack URL They can also choose the "Save to manifest file" option if they would like to save the properties that are being set by this wizard
7.Feature: the subdomain, domain, deployed URL, and memory limit can be set .If you don;t want to choose service you can pass the next wizard.
Checking application - HelloWorldNode
Generating application archive
Creating application in Cloud Foundry server
Pushing application to Cloud Foundry server
Application successfully pushed to Cloud Foundry server
-----> Downloaded app package (4.0K)
-----> Buildpack Version: 20140522-0208
-----> Resolving node version by IBM
PRO TIP: Specify a node version in package.json
-----> Defaulting to latest stable node: 0.10.21
-----> Installing IBM SDK for Node.js from admin cache
-----> Read service config: MonitoringAndAnalytics.json at the start
-----> Read service config: SQLDB_BLUAcceleration.json at the start
-----> Writing a custom .npmrc to circumvent npm bugs
-----> Installing dependencies
npm WARN package.json firstname.lastname@example.org No repository field.
npm WARN package.json email@example.com No README data
-----> Cleaning up node-gyp and npm artifacts
-----> No Procfile found; Adding npm start to new Procfile
-----> Building runtime environment
-----> Read service config: MonitoringAndAnalytics.json at the end
-----> Read service config: SQLDB_BLUAcceleration.json at the end
9.Right click on the project in the Servers View > Open Home Page you can see your application via the browser.
10.If you change the app.js code,you need to re-publish your application in the BlueMix server.