NodeJS specific guidence and convention.
nvm
- Node Version Manager
This allows you to switch between versions of node on the fly.
nvm install 6
nvm alias default 6
A .node-version
file is the convention for declaring a projects intended node runtime.
This is read by the module avn
, which interfaces with nvm
to switch to the projects node version
- Install:
npm i -g avn
cd my-new-project
echo "6" > ".node-version"
cd ~
cd my-new-project
$ avn activated 6 (avn-nvm v6.9.1)
TODO:
- describe vscode examples, links
- when to use debugging
- using in serverless projects
CICD should be as reproducable as possible.