Today we will get you set up with some additional tools that are needed for web development. The main technologies we need to ensure everyone has are NVM, Node, and NPM.
Verify that nvm has been installed
$ command -v nvm
You should see an output in your terminal of
nvm
Change directory into your home directory
$ cd ~
Open your ZSH configuration file in your text editor
$ code .zshrc
OR
$ atom .zshrc
Scroll to the bottom of the file. You should see these lines of code
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
If you do not see these lines of code, go ahead and copy/paste them to the bottom of your .zshrc file Then run this command in your terminal to re-load your .zshrc configuration
$ source .zshrc
Node is a core technology for full-stack JavaScript development. Installing Node also gives us access to NPM, which is a tool that enables us to install 'packages' through the command line.
Usage To download, compile, and install the latest release of node, do this:
$ nvm install node
And then to ensure you are using node each time your terminal starts, add this line to the bottom of your .zshrc file:
nvm use node
Additional Info from NVM Documentation
$ npx lite-server