Since the error in cloud9 console probably tells you (as it tells me when I try this :-)):
haalasdoallalsakdl (CloudFoundry): [5/6] Crash log ============/logs/stderr.log============ node.js:201 throw e; // process.nextTick error, or 'error' event on first tick ^ TypeError: Cannot read property '0' of undefined at Object.<anonymous> (/var/vcap/data/dea/apps/haalasdoallalsakdl-0-8be0d413a9ec29a79f665d388ce414bd/app/server.js:7:35) at Module._compile (module.js:432:26) at Object..js (module.js:450:10) at Module.load (module.js:351:31) at Function._load (module.js:310:12) at Array.0 (module.js:470:10)
Thus, the entry in VCAP_SERVICES is called so. When I console.log variable process.env , there are no services in it.
So, you will need to install the mongodb service for your application. The fastest way to do this is with VM VMC tools (currently this cannot be done in cloud9, so you have to install it locally):
vmc create-service mongodb
Then it will start normally.
NB You can probably fix this in a .yml file, but I don't know how to do this :-)
source share