mkdir project1
cd project1
npm init -y
package.json
{
"name": "project1",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "",
"license": "ISC",
"dependencies": {
// Here all the dependencies will be added
}
}
npm install http-server
(or)
npm i http-server
"http-server": "^0.12.3"
npm remove http-server
npm install http-server@latest
npm install http-server@0.12.2