Create your empty repo
Create index.js file (where express is going to be set up)
'npm init' (if you want to answer some questions). 'npm init -y' (if you want to bypass questions)
Now you will see package.json in your repo. let's download express by 'npm i express'
Now set up nodemon so I can watch server running using 'npm i -D nodemon'. create "start": "nodemon index.js"
set up express server in your index.js
const express = require('express');
const app = express();
const port = 3000;
app.listen(port, () => console.log (`Successfully started server at port ${port}`);
Top comments (0)