This is a port of the Node.js Cache Web Starter that demonstrates how to use the Bluemix Data Cache service.
This uses the Bluemix Community Redis service instead because Community Redis has a free plan and the Bluemix Data Cache does not have one anymore. Other than using Redis instead of the Bluemix Data Cache Service as the back end for storing data, this app is the same as the Node.js Cache Web Starter. It lets the user enter key-value pairs to cache, then looks up or deletes keys and changes existing cached values.
If deploying to Bluemix, note that the Redis service is a community service from Cloud Foundry and is listed as Experimental.
This app will run locally using an in-memory cache instead of the Redis service if the VCAP_SERVICES environment variable is not set.
- Install Node.js
- Download and extract the starter code from the Bluemix UI
- cd into the app 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 http://localhost:3000
Sample web applications that include this tracking library may be configured to track deployments to IBM Bluemix and other Cloud Foundry platforms. The following information is sent to a Deployment Tracker service on each deployment by default:
- Application Name (
application_name
) - Space ID (
space_id
) - Application Version (
application_version
) - Application URIs (
application_uris
)
This data is collected from the VCAP_APPLICATION
environment variable 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.