Bhaiya i have an doubt While writing functions like findbyid() which is present only in mongoose but not in mongodb So for these functions should we use only that is defined in mongoose and not in mongodb?
}). I have noticed that if we have used already /students for update for patch request with the help of id, then we can't use /students again for another patch request . I mean use /student/:name or /stud/:name but not the same end point for the same type of request. This is my observation, I don't testify that.
if anyone getting error of no connection in console after writing this -useFindOneAndReplace:false then don't write this in mongo 6.0 version it will take those value automatically
3 2 1 Boom..loved it..Best playlist ever made on youtube on backend
Love You Thapa Bro.. For Providing Such a Quality Content.. for free...
I am learning a lot from your Playlists and Courses...🤩
for others: it is an Underrated channel
This is the best video playlist for mongo db in Hindi
Meaningful and useful tutorials..
sir name se get karna ho to students/:id ki jagahh students/:name likhna rahega ?
Thanks bro because of you understanding such difficult concepts becomes much more easy and simple
UseFindAndModify is not supported in my case ....and my data is not updating....what should i do
Nice video and thanks..luv u bro..
love from Pakistan
Fantastic video😄👏
Awesome 👍🔥
superb keep it up
*_KEEP IT UP_* 🔥✌🏻👌🏻
A very helpful video. Thanks
Great and Awesome work
sir ek Complete project MEAN stack Project bana do(AngularJS,NodeJS,ExpressJS,Mongodb)
Thank you sir...
sir ye html and react se kaise bhejte hai request tab to/update route bnana padega?
Sir await func node js mn ni used kr rhy tahy ap for aysnc
Wahn sync func waiting k kam kr rhy tahy
Yhn async, await
Well done.Thank you sir
love you thapa
good job bro
Maza a gaya bro
plz make a video on crud with frontend control
So helpful
sir swagger documentation pe video bnao na
put ka nhi btaya apne sir
use .save() use ktrenge?
Html form wali video kab aayegi, Mongodb atlas ke sath🥺🥺🥺🤒🤒
Bas jaldi aaney wali hau
thank you
First like and comment
Dai when are we going to connect with the front end ????
Bro, please can you make a video on how to run this patch request using html.
Nice video bro
Thanks brother 😊
Sir make videos on three js and canon js as possible please 🙏🙏🙏
First Please Give Reply
Sure ☺️
// Exercise
const name = req.params.name;
console.log(name);
// const updateStudents = await Student.findByIdAndUpdate(_id, req.body,{
const updateStudents = await Student.findOneAndUpdate(name,req.body,{
next: true
});
res.send(updateStudents);
its not working, please someone help
Aabe ulu res.send(updatestudents) is undefined next kya h?
Kya aap orm pe kuch karnewale kya sir jee
Sir wants a Complete MERN Project....
want*
Bhaiya i have an doubt
While writing functions like findbyid() which is present only in mongoose but not in mongodb
So for these functions should we use only that is defined in mongoose and not in mongodb?
Yes, because you are using mongoose package.
Bro mai apki react ki playlist daikh raha sath Sath node bhi karta jain?
Yes you can
Find by name kese kare ..Any ans ?¿
app.patch("/students/:name",async(req,res)=>{
try{
const StudentData = await Student.findOneAndUpdate( req.params.name,req.body,{new:true})
res.status(201).send(StudentData)
console.log(StudentData)
}
catch(e){
res.status.apply(500).send(e)
}
}).
I have noticed that if we have used already /students for update for patch request with the help of id, then
we can't use /students again for another patch request . I mean use /student/:name or /stud/:name but not
the same end point for the same type of request.
This is my observation, I don't testify that.
Bro it will update only single time name
sir make video to insert more then one user data into mongodb
Bro... What are these private videos in ur Playlist???
They are private videos
bro findbyidand delete work nahi kar raha
How to update array of object if I take type : [string]
bro express ke alava bi bahot kuch hain
how to find by name i'm unable to do it please help
if anyone getting error of no connection in console after writing this -useFindOneAndReplace:false
then don't write this in mongo 6.0 version it will take those value automatically
Hello Bro, Bro I need the code of Patch request for deposit money in my account and also update the balance of account after deposition
Ok Ishtiaq Karachi
Sir please react native ka tutorial banaeye
Sure sure
I am waiting
vinod
Bro can you please also reply to my query, i will be really thankful
Although your videos are excellent
First
Kisine challenge pura kiya hoto batao please
Uppdate the field by student name:
app.patch("/student/:name", async function (req, res) {
try {
const name = req.params;
console.log(name);
const updateUser = await Student.findOneAndUpdate(
name,
{ $set: req.body },
{
new: true,
}
);
res.status(200).send(updateUser);
} catch (e) {
res.status(400).send(e);
}
});
please send this code on ur github
Bro why u talkin 2 languages
Second
Excercise: 👉
const name = req.params.name
Instead of FindByIdAndUpdate......
use FindOneAndUpdate
✌✌
//
app.get("/students/:name", async(req, res)=>{
try{
const names = req.params;
const studentData = await Student.findOne(names)
//Above 2 lines can be replaced by below 1 line of code. Both codes
//are equal
// const studentData= await Student.find({name: new RegExp('^' + req.params.name + '$', "i")});
console.log(studentData);
if(!studentData){
return res.status(404).send();
}
else{
return res.send(studentData);
}
}catch(err){
res.status(500).send(err);
}
})
not working bro