This application demonstrates a simple, reusable Node.js web application based on the Express framework.
- Install Node.js
- cd into this project's root directory
- Run
npm install
to install the app's dependencies - Run
npm start
to start the app - Access the running app in a browser at the URL written to the console (most likely http://localhost:6012)
docker build -t imageName:tag .
where imageName
is whatever you want to call your Docker image and tag
is something like v1
or latest
.
This application uses a metrics tracking package to track deployments to IBM Bluemix and other Cloud Foundry platforms. The following information is sent to a Deployment Tracker service on each deployment:
- Node.js package version
- Node.js repository URL
- Application Name (
application_name
) - Application GUID (
application_id
) - Application instance index number (
instance_index
) - Space ID (
space_id
) or OS username - Application Version (
application_version
) - Application URIs (
application_uris
) - Cloud Foundry API (
cf_api
) - Labels of bound services
- Number of instances for each bound service and associated plan information
- Metadata in the
repository.yaml
file
This data is collected from the package.json
and repository.yaml
file in the sample
application and the VCAP_APPLICATION
and VCAP_SERVICES
environment variables in
IBM Bluemix and other Cloud Foundry platforms. This data is used by IBM to track metrics
around deployments of sample applications to IBM Bluemix to measure the usefulness of our
examples, so that we can continuously improve the content we offer to you. Only deployments
of sample applications that include code to ping the Deployment Tracker service will be tracked.
To disable tracking, comment out the following line in app.js
:
require('metrics-tracker-client').track();
If you're not using tracking, you can edit the package.json
file to remove
the requirement for metrics-tracker-client
if you like.