- Create new NodeJS 0.6 application in OpenShift.
- Souce Code: https://github.com/raidokaldma/key-value-store
- Add new cartridge: MongoDB
- Restart your application to pick up MongoDB environment variables:
- Option 1 (using OpenShift RHC Client Tools):
- rhc app-restart
- Option 2 (using ssh):
- ssh [email protected]
- gear restart
# Set up port forwarding for MongoDB access
rhc port-forward <your-app>
export OPENSHIFT_MONGODB_DB_URL=mongodb://admin:<password>@127.0.0.1:27017/
export OPENSHIFT_NODEJS_PORT=3000
./server.js