hohoho
hohoho

Reputation: 230

How can I specify multiple Node.js runtime versions in my application to deploy to Bluemix?

In the package.json of my application, we can specify the node version:

  1. What is the default Node.js runtime version if I do not specify anything?
  2. Can I specify multiple node versions (say 0.10.x and 0.12.x) when I deploy to bluemix? Or I need to deploy twice, one to each version?

Thanks in advance.

"engines": {
  "node": "^0.10.*",
  "node": "^0.12.*"
} 

Thanks in advance

Upvotes: 0

Views: 473

Answers (2)

Rakesh Ranjan
Rakesh Ranjan

Reputation: 106

Currently, Bluemix provides four versions of IBM SDK for Node.js runtime. They are v0.10.21, v0.10.25, v0.10.26 and v0.10.28. These versions contain IBM enhancements and bug fixes.

You should always specify a node version(single) in the package.json file. But if you don't, the latest version will be used.

More details are here:

https://www.ng.bluemix.net/docs/#starters/nodejs/index.html#deploynodejsapp

Upvotes: 1

Jake Peyser
Jake Peyser

Reputation: 1190

The current default version of node.js in Bluemix is 0.10.x. However, the default buildpack is set to be bumped to 0.12.x in the near future.

I recommend that you always specify the buildpack, as the default version may change without direct communication with owners of node.js apps on Bluemix.

You are not able to specify multiple node versions within a single package.json file. If you want a 0.10.x and 0.12.x version of your app deployed at the same time, you will need two separate applications.

Upvotes: 2

Related Questions