- Install: https://nodejs.org/en/download/package-manager/
- Powershell - Node Version Switcher:
nvs
- Install:
choco install nvs
- Install a Node version:
nvs add latest
- Install:
- Bash - Node Version Manager:
vnm
- Install:
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.0/install.sh | bash
- Install a Node version:
nvm install <version>
- Use a version:
nvm use <version>
- Install:
- Initialize package.json:
npm init
- Install dependencies (from existing package.json):
npm install
- Install a package in project (package.json):
npm i <package>
- Install a package globally:
npm i -g <package>
- repl (read-eval-print-loop):
node
- Run JavaScript in the terminal:
node <filename>.js
ornode .
(automatically finds index.js)