node to express code example
Example 1: node js express
basic server
const express =require('express');
const app = express();
const PORT = 5000;
app.get('/',(req,res)=>{
res.json({message: 'Welcome to the backend'})
})
app.listen(PORT ,()=>console.log(`Connected to ${PORT}`)
Example 2: express nodejs
Fast, unopinionated, minimalist web framework for Node.js