Basic node express api
Very first we need to create a node application and install express
Installing express
npm i express
If you don't know how to create a node application check this link bellow
Create a js file under root folder in this case I am going to put file name index
index.js
import express from "express";
const app = express();
//get request
app.get("/", (req, res) => {
res.send("Hello World");
})
app.listen(5000, () => {
console.log(`Server is running on port 5000`);
})