note get data in the post node js express code example
Example 1: express receive post data
const { id } = req.body;
Example 2: app.post (req res) get data
const express=require('express');
const app=express();
//accept Post with no midleWare express
app.post("/register/",function(req,res){
var bodyStr = '';
req.on("data",function(chunk){
bodyStr += chunk.toString();
});
req.on("end",function(){
res.send(bodyStr);
});
});