I am making below post request , from frontend it is successful…when run on local backend server giving correct output but when deployed on render server , it is not accepting post requests. Please resolve the issue as soon as possible
app.post(‘/prescription’,(req,res)=>{
console.log("Request printing...")
const pres = req.body;
const prescription = new Prescription({
pid:pres.m_num,
dob: pres.DOB,
visit_no: pres.Visit_No,
name : pres.Name,
address: pres.Address,
age : pres.Age,
sex : pres.Sex,
mobile_no : pres.m_num,
diagnosis :pres.Diagnosis,
goal_for_next_month : pres.Goal,
prescription: pres.Prescription,
payment_receipt : pres.Receipt,
description : pres.Description
});
console.log(prescription)
prescription
.save()
.then(
() => console.log("One Prescription added"),
(err) => console.log(err.message)
);
res.send("Post request sent");
})