My first express.js files
Steps:
- Initialize the project, run
npm init -y - Update the package.json, change this part:
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
}
into this:
"scripts": {
"server": "nodemon index.js"
}
- Run
npm install express - Run
npm install nodemon --save-dev - Run
npm install ejs - To start the server, run
npm run server