« »
11/04/2015

Managing various NodeJS version per projects

How to manage multiple projects with their own NodeJS version? 

Simple, use nvm.

But how do I automatically change NodeJS version?

Simple use a .nvmrc inside each project and a .env loaded by autoenv when cding inside the project to automatically change NodeJS version between project just by using cd.

It's not DRY, I want to stay DRY and don't duplicate NodeJS version inside both package.json and .nvmrc, what do I do?

Well, remove your .nvmrc and replace .env content by:

And now you're DRY :)

« »
 
 
Made with on a hot august night from an airplane the 19th of March 2017.