Uday
Uday

Reputation: 829

How to change node runtime version

I want to use nodejs version 0.6 or above in cloud foundry . currently my app uses v0.4.12. I tried below manifest.yaml but No luck. what should i do next? any help would be appreciated

Thanks

--- 
applications: 
  .: 
    name: shanbhag
    framework: 
      name: node06
      info: 
        mem: 64M
        description: Node.js Application
        exec: 
    url: ${name}.${target-base}
    runtime: node06
    mem: 64M
    instances: 1
    services: 
      mongodb-fc654: 
        type: mongodb

Upvotes: 0

Views: 2445

Answers (2)

Dan Higham
Dan Higham

Reputation: 3984

When you deploy the app, specify the runtime version like so;

vmc push myapp --runtime=node06

or for node.js 0.8

vmc push myapp --runtime=node08

Upvotes: 5

Hector Correa
Hector Correa

Reputation: 26690

Do you have a package.json file? If so, update the engines section:

"engines": {
    "node": "0.8.x"
  }

Also, the Cloud Foundry documentation at http://docs.cloudfoundry.com/frameworks/nodejs/nodejs.html has some information on this subject. You might need to run some of the commands that they mention.

Upvotes: 1

Related Questions