skip to Main Content

Mongodb – mongoose how to update an user profile with id

I created an simple CRUD operation in nodejs and mongoose. Updating an user using RESTAPI. an error message in Insomnia Error: Server returned nothing (no headers, no data) URL http://localhost:1337/api/users/update/63ab9b716065482273e58b75 @PUT METHOD router.put("/update/:id",updateUser) const updateUser = async (req,res,next) => {…

VIEW QUESTION

MongoDB group by date and select values

I'm relatively new to MongoDB and node.js. Here is what I'm trying to achieve: I have a collection that contains several thousand documents in MongoDB. The documents look like this: { "date": "2020-02-24", "iso_code": "USA", "country": "USA", "avg_temperature": "25F", },…

VIEW QUESTION
Back To Top
Search