seamlessict / darey

0 stars 0 forks source link

Installing Nodejs/npm and initializing the Nnpm package manager #14

Closed seamlessict closed 1 year ago

seamlessict commented 1 year ago

Here we use the sudo apt update command as usual to update all necessary packages and then use the curl command to get the location of nodejs on the Ubuntu repository.

Image

The next step is to install nodejs which is the backend for the MERN stack using the following command sudo apt-get install -y nodejs this command installs both node and npm which nodejs package manager both installation can be tested by simply running the command node --v or node --version and npm --v or npm --version to see the version of the installed nodejs and npm else an error will be thrown.

Image Image

Create the application directory using the mkdir command and cd into it in order to initialize the npm into it using the command npm init this will create the default files (package.json, ) needed by our application to run.

Image