What is npm?
This is similar to cargo for
Rust, pip for Python, vcpkg for C++, gem for Ruby, composer for PHP,
etc,
npm is default package manager for JavaScript & JavaScript runtime
environment Node.js.
It is an online database of public and paid-for private packages, called
the npm registry. The registry is accessed via the client, and the
available packages can be browsed and searched via the npm website.
Installation on WSL
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.3/install.sh | bash
source ~/.bashrc
nvm install --lts
nvm use --lts
Example Usage
Hello, World Example
Create package.json
|
Create index.js and test.js(module to test index.js)
|
Run test
|