Node and npm

by Sai gowtham1min read

What is Nodejs?

Nodejs is a backend JavaScript framework built on top of the v8 JavaScript engine.

why we need this ?

  • Because we need to run a local development server with the help of nodejs and also we need to test the app on the local machine.

How to install nodejs?

  • Open website and download.
Once your installation is completed open your terminal and run (node -v) if the version number is displayed then your are successfully installed.

What is npm?

npm is a node package manager which is used to install the libraries created by the other people. By using npm you can install or uninstall packages at any point in time.

some important commands.

To install any new packages you need to run these commands in your terminal.

npm install <packagename>

Uninstalling a package

npm uninstall <packagename>
npm install -g <packagename>

-g is a global flag it means the package is globally installed in your system.

npm install -D <package>

-D it means the package which is only used during development, not in production.