How to set up server-side using express & node
Edrick Ee
Posted on August 13, 2021
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}`);
💖 💪 🙅 🚩
Edrick Ee
Posted on August 13, 2021
Join Our Newsletter. No Spam, Only the good stuff.
Sign up to receive the latest update from our blog.