Rituraj ratan
Rituraj ratan

Reputation: 10378

How can handle node.js version folder wise?

I have two project in Node.js

like

  1. projectA (work with node -V0.10.25)

  2. projectB (work with node -V0.12.5)

How can i handle this, that at a time projectA run with node version V0.10.25 and projectB with node version v0.12.5

Upvotes: 1

Views: 1514

Answers (1)

Hiren S.
Hiren S.

Reputation: 2832

Make Use of Node Version Manager like n or nvm.

https://www.npmjs.com/package/n

Install n node version manager using npm

npm install n -g

Then install node binaries for n

n 0.10.25
n 0.12.5

Then run your project using n with specific version

n use 0.10.25 projectAServer.js

n use 0.12.5 projectBServer.js

Upvotes: 4

Related Questions