skip to Main Content

Mongodb – MongooseError: Model.create() no longer accepts a callback how to use async await?

app.post('/contactForm',function(req,res){ Contact.create({ name: req.body.name, phone: req.body.phone }, function(err, newContact){ if(err){ console.log(err, 'error in connectiong'); return; } console.log("*******", newContact); return res.redirect('back'); }) }) /home/ganesh/Web Dev/CN Web Dev/HTML/basics/Nodejs Workspace/contact_list/node_modules/mongoose/lib/model.js:2771 throw new MongooseError('Model.create() no longer accepts a callback');

VIEW QUESTION

How do I run PayPal backend in VSCode – Javascript

I am trying to follow the example here https://github.com/paypal-examples/docs-examples/tree/main/standard-integration except I modified the front end to use reach via react-paypal-js https://github.com/paypal/react-paypal-js But I dont understand how to launch the backend server.js script I am running the page with npm start…

VIEW QUESTION
Back To Top
Search