Mongoose schema in node js | CRUD operation in node js with try catch statement

Поделиться
HTML-код
  • Опубликовано: 2 дек 2024

Комментарии •

  • @akshayshrivastava6057
    @akshayshrivastava6057 9 месяцев назад +43

    For most of the user's like me questioning where does that collection name "people" came .let's have some explanation.(say thanks as I have done research for you).😁😁.
    In Mongoose, if you create a model without explicitly specifying a collection name, Mongoose will pluralize the name of the model to determine the collection name. In your case, since your model is named "Person", Mongoose will pluralize it to "people" and use that as the collection name by default. This is a common convention in MongoDB and Mongoose for naming collections.
    If you want to explicitly specify a different collection name, you can do so by passing the desired collection name as the third argument when creating the model using mongoose.model(). For example:
    "const Person = mongoose.model('Person', personSchema, 'my_custom_collection_name');"

    • @2719yash
      @2719yash 6 месяцев назад +1

      Bro can you plz. share notes

    • @messi69goat
      @messi69goat 5 месяцев назад +1

      anyone help in my terminal it only shows connected to mongo server it doesnt shows disconnection although i stop the mongo server

    • @akshayshrivastava6057
      @akshayshrivastava6057 5 месяцев назад

      @@messi69goat hi please share more info on it

    • @messi69goat
      @messi69goat 5 месяцев назад

      @@akshayshrivastava6057 in the video when we start mongo server the terminal print saying the server is connected and when we stop server it will say disconnected but in my case it doesn't says it is disconnected what should I do although it says it's connected

    • @rishabhsingh1492
      @rishabhsingh1492 5 месяцев назад +1

      Thanks bhai

  • @AJ-wf3wp
    @AJ-wf3wp 10 месяцев назад +21

    guys plz keep liking the video....for his motivation

  • @Kabir-777
    @Kabir-777 10 месяцев назад +7

    A perfect course for node.js and backend as well. Much more then a paid course. Please don't leave it incomplete 🥰😘

    • @tricksforsolving2804
      @tricksforsolving2804 10 месяцев назад +1

      To bhi Tera sb sahi se run hora he ,cmd me kuch error nahi Ara he??

    • @Kabir-777
      @Kabir-777 10 месяцев назад +1

      @@tricksforsolving2804 han bhai sab sahi run ho raha he

    • @tricksforsolving2804
      @tricksforsolving2804 10 месяцев назад

      @@Kabir-777 sahi he fir

    • @amanisdreaming3914
      @amanisdreaming3914 8 месяцев назад

      nodeman ka error aa rha hain mera toh

    • @prakharjain4904
      @prakharjain4904 Месяц назад

      do you have notes

  • @rajputsujal5966
    @rajputsujal5966 3 дня назад

    Not any RUclips channel note explain and tech this type node js. Thank you sir ❤❤

  • @DinkyUnadkat
    @DinkyUnadkat 5 месяцев назад +2

    hats off, I tried so many courses to learn back end this is the bestest and most easilyy understandable. I pray god gives u so much success and so many subscribers u really deserve it. I will be sitting for placement in august and this videos make me feel very hopeful. thank you

  • @theKing-dh5gj
    @theKing-dh5gj День назад

    one of the best playlist for node js . Thankyou so much bhaiya for this playlist .

  • @abhishektyagi5941
    @abhishektyagi5941 10 месяцев назад +6

    I'm not the person who comments on any of the videos, but the way you teach is just amazing.
    I am grateful that I found your channel when I started learning the backend.
    Thanks a lot, already subscribed to your channel.

    • @HelloWorldbyprince
      @HelloWorldbyprince  10 месяцев назад +3

      I am soo happy for such positive vibes
      Keep learning and pls share as much as you can to support our channel

    • @VaishaliSharma374
      @VaishaliSharma374 5 месяцев назад

      Hey can you please help me out,
      While downloading mongoDB, a file named 'mongo.exe' has to be downloaded, which when i download it got downloaded with the name 'mongo' only.
      When I'm trying to connect mongoDB server with node.js server, it is not gteting connected.
      Is this issue came coz of not downloding 'mongo.exe' file properly ?

  • @rishikagoyal8043
    @rishikagoyal8043 8 месяцев назад +3

    Top notch content. I wish you get a millions of subscribers this year🤞

  • @aniketkadale5960
    @aniketkadale5960 3 месяца назад

    Most underrated playlist on YT. Loving the series so far !! ❤❤

  • @ShivamBhawel-zq1fg
    @ShivamBhawel-zq1fg 8 месяцев назад +2

    bohot sahi study krwate he bhaiya.....Thank u so much....
    .

  • @AkashSharmaSDE
    @AkashSharmaSDE 8 месяцев назад +1

    Maza aagya bhaiya pdhke aapse concepts clear hogye

  • @yashjadhav7543
    @yashjadhav7543 16 дней назад

    Thank you for explaining Node.js so clearly🙏🙏

  • @anandsinha2289
    @anandsinha2289 9 месяцев назад +1

    maja a gya bhaiya inta acha padhane ke liye dil se sukriya 🚀🚀🥰😘

  • @anonymous090
    @anonymous090 9 месяцев назад

    homework krte hai bhaiya... these lectures are amazing

  • @AnkitKumar-mc8de
    @AnkitKumar-mc8de Месяц назад

    Wonderful Bhaiya !!👏🏻👏🏻👏🏻👏🏻👏🏻👏🏻The way you teach is awesome.

  • @haris7247
    @haris7247 9 месяцев назад +2

    my server.js file is throwing errors and not getting connected to mongoDB @11:42. On terminal it shows server is listening on port 3000 and then throws an error and nodemon gets crashed.

    • @coder.gremogt
      @coder.gremogt 8 месяцев назад

      whats ERROR
      ?

    • @amanisdreaming3914
      @amanisdreaming3914 8 месяцев назад

      thik hua?

    • @roshanraturi6450
      @roshanraturi6450 8 месяцев назад

      mera bhi yahi bta rha h same

    • @arijitsinghmusic7508
      @arijitsinghmusic7508 7 месяцев назад

      This error typically occurs when you're using an outdated or incorrect option name. The correct option name is useUnifiedTopology, not useunifiedtoplogy.

  • @codin7367
    @codin7367 8 месяцев назад

    prince bro the way you teach is fabulous and makes complex topics digestible... I am currently looking for job as a fresher but people wants only experienced others are not responding😢

  • @shashankkhare-zw1ie
    @shashankkhare-zw1ie 7 месяцев назад

    One of the best node.js tutorial. Great explaination

    • @2719yash
      @2719yash 6 месяцев назад

      Bro can you plz. share notes

  • @aritrakhatua8210
    @aritrakhatua8210 10 месяцев назад +1

    Definitely better bootcamp than a so called Udemy Course

  • @Fun044
    @Fun044 5 месяцев назад

    Thank you very much Sir for making such lecture deep explaination along with notes and Error handling better than many paid courses hats of you Sir dil se Shhukriya 🤍

  • @Pallavi25010
    @Pallavi25010 5 месяцев назад +1

    Jo aapne postman me person data likha tha / laga ke jisme name and other details likhi thi wo kaha pe bana ke rakha tha ??.uska koi folder ni dikha ?jaise idli sambhar wala data to banaya tha ek folder me par ye wala ni dikha kaha banaya?

  • @NikhilChoudhary-hi6fo
    @NikhilChoudhary-hi6fo 8 месяцев назад +1

    best of best bhai ...Thanku so much.....
    Truly Helpfull

  • @mohitkansal7642
    @mohitkansal7642 9 месяцев назад

    At 12:42 is it command prompt?. My community server is not starting.

  • @vikash.pandey1550
    @vikash.pandey1550 4 месяца назад

    thanks bhaiya you deserve a million followers

  • @lalitbisht8381
    @lalitbisht8381 2 месяца назад

    Next level things❤ exaplained very well🎉

  • @MAYANKSINGH-mf2ll
    @MAYANKSINGH-mf2ll 8 месяцев назад

    Thanks Bhaiya for the Amazing Course and hardwork you put in this course 😍
    Literally speaking ,this course has boost my confindence

  • @amangupta1970
    @amangupta1970 4 месяца назад

    Hi, what do you use for autocompleting what you are writing. for example: when you type "con" it automatically shows you "console.log(" and then you just press tab i think to complete it.

  • @Vanshit_Patel
    @Vanshit_Patel 7 месяцев назад

    Ek number bhai easy to learn and understand aapne bataya he 👍

    • @2719yash
      @2719yash 6 месяцев назад

      Bro can you plz. share notes

  • @062nayemurrahman8
    @062nayemurrahman8 10 месяцев назад +1

    You deserve more subscribers brother. Thanks for your service❤

  • @lohitkumarpatra6906
    @lohitkumarpatra6906 10 месяцев назад +1

    well explain bhaiya,homework done...

  • @HammadButt-xk3sm
    @HammadButt-xk3sm 20 дней назад

    litterally amazing!!!!!!

  • @vedbhanushali608
    @vedbhanushali608 10 месяцев назад +5

    was waiting for this 👍🏻

  • @shubhamsingh-gb5zh
    @shubhamsingh-gb5zh 3 месяца назад +1

    MongoDB assigns a unique _id for each document.

  • @TonaySadhukhan
    @TonaySadhukhan 5 дней назад

    Sir i am facing this error
    address: ValidatorError: Path address is required.
    at validate (C:\Users\Tonay Sadhukhan\Desktop
    ew node js
    ode_modules\mongoose\lib\schemaType.js:1385:13)
    at SchemaType.doValidate (C:\Users\Tonay Sadhukhan\Desktop
    ew node js
    ode_modules\mongoose\lib\schemaType.js:1369:7)
    at C:\Users\Tonay Sadhukhan\Desktop
    ew node js
    ode_modules\mongoose\lib\document.js:3071:18
    at process.processTicksAndRejections (node:internal/process/task_queues:77:11) this is showing

  • @parthtakale4308
    @parthtakale4308 6 месяцев назад +9

    sir can you please provide the notes

  • @nehathakur40
    @nehathakur40 10 месяцев назад

    Best bootcamp for beginners

  • @muhammadshakeelayaz3086
    @muhammadshakeelayaz3086 2 месяца назад

    all awsome , greate dear God bless you

  • @sandeepkumarg1889
    @sandeepkumarg1889 10 месяцев назад +1

    Great lecture sir🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏

  • @yashparashar6781
    @yashparashar6781 9 месяцев назад +1

    Thank you for the course😇

  • @AliinNITW
    @AliinNITW 10 месяцев назад +1

    Can i use .then() and .catch() to handle asynchronous functions . what should i prefer async await or .then().catch()

    • @ManojDas-uf1zk
      @ManojDas-uf1zk 7 месяцев назад +2

      you should prefer async await beacuse of code readability and less code syntax

    • @amarjoshi8583
      @amarjoshi8583 5 месяцев назад

      you can use both but modern mern developers use async/await as per industry standards.

  • @Funny91298
    @Funny91298 2 месяца назад

    Every thing fine there , Cmd type there brew services start there----- is am gona put same command in windows give error ..
    confuse to understand But I have GUI Compass . Can Explain there a Bit Confusion there
    Thanks Sir (Hello World)

  • @sanketrinayat9736
    @sanketrinayat9736 4 месяца назад

    Guys, Hats-off to this course. Can anyone help me with the notes link, it will be very helpful.
    I am not able to get they way to access it.

  • @zohaircyber
    @zohaircyber 7 месяцев назад

    Dear sir, I am Zohair Faruqi from Karachi, Pakistan I would like to say that your course is very helpful for those whose beginners.
    Most of the students are overseas , kindly to give free link for your foreigner students , they need notes too , for follow your course.
    Because foreigners have not any payment method. Kindly understand most of the students problems.
    Thanks
    Zohair Faruqi

  • @theTrendy23
    @theTrendy23 10 месяцев назад

    Thanks bhai for world best node course

  • @minecraftcookie2929
    @minecraftcookie2929 6 месяцев назад

    Wow when i am able to do the first entry in the db i am so happy

    • @2719yash
      @2719yash 6 месяцев назад

      Bro can you plz. share notes

    • @minecraftcookie2929
      @minecraftcookie2929 6 месяцев назад

      @@2719yash i dont have notes. i dont make 'em i do practical hands on and if i feel something is really important i comment it out in my code

  • @WebartMorning
    @WebartMorning 5 месяцев назад

    thank you , this is very simple to undersatnd

  • @KartikeyBhardwaj-bd5sg
    @KartikeyBhardwaj-bd5sg 3 месяца назад

    Bhaiya crud wale chapter mai window mai command prompt par mongodb server start kaise kare problem ho rahi hai

  • @minecraftcookie2929
    @minecraftcookie2929 6 месяцев назад

    Thanks so much for this amazing course

  • @pankajchadda1780
    @pankajchadda1780 2 месяца назад

    Bhai yeh mogodb mein hotel database kaise ban gaya, can anyone tell please, kya woh mongoURL ki wajah se bana

  • @_hulk748
    @_hulk748 5 месяцев назад

    Wonderful Video sir🙏🙇‍♂✨💖

  • @PihulLalotra
    @PihulLalotra 6 месяцев назад

    Can you tell the extensions you are using in VsCode

  • @vibha3031
    @vibha3031 7 месяцев назад

    maza aagya bhaiya !! great lecture

  • @Prakhar-c3f
    @Prakhar-c3f 8 месяцев назад

    best
    explaination
    ever

  • @junaiid0104
    @junaiid0104 5 месяцев назад

    crazy playlist sir !!!!!

  • @mehedihasannnnn
    @mehedihasannnnn 10 месяцев назад

    thank you vaiya for such a great bakcend bootcamp !!!! maja a gya

  • @amanisdreaming3914
    @amanisdreaming3914 8 месяцев назад

    how to start mongo db service in windows? what are the cmd commands? 4:38

  • @SilentGaming-satisfaction
    @SilentGaming-satisfaction 5 месяцев назад

    Bhaiya Love from Nepal❤ Your teaching style is awesome
    Bhaiya I have one doubt
    In GET method, menu Ka port 3001 mey hogaya but 3000 mey he menu +person Ka nahe hora hey why?

  • @rohanvishwakarma9409
    @rohanvishwakarma9409 8 месяцев назад

    bhaiya ajay bhaiya ke channel nhi mil rha kya hai name plz🙏🙏

  • @PritomDas-b2y
    @PritomDas-b2y 10 месяцев назад +2

    successfully done 🙂

  • @piyushgupta7259
    @piyushgupta7259 8 месяцев назад

    Hii Bhaiya ,
    Database me people name ka collection kaise bana humne toh use code me kahi mention nahi kiya tha ...??
    please reply

    • @piyushgupta7259
      @piyushgupta7259 8 месяцев назад

      got the answer person plural is people 😊

  • @moinali9874
    @moinali9874 5 месяцев назад

    Bhai sidha atlas ya compas se bhi to link leke database se connect kar sakte h na i am beginner isliye puch ra hu

  • @rajyavardhanpmsv7419
    @rajyavardhanpmsv7419 3 месяца назад

    Can anyone say me when data was saved , why was it getting saved in peoples database?

  • @im_harsh.ai.
    @im_harsh.ai. 2 месяца назад

    sir ye people collection to banaya table me nahi ye aytomatically kese create ho gaya samaj me nahi aya ye chij

  • @Child34Shorts
    @Child34Shorts 10 месяцев назад

    Question:- Bhaiya What to do next after this course??

  • @saurabhtiwari9653
    @saurabhtiwari9653 7 месяцев назад

    bhaiya I think in new verson of node useNewUrlParser is not necessary

  • @bhushan321
    @bhushan321 10 месяцев назад

    Good explanation 👏 👍

  • @starEMERGE
    @starEMERGE Месяц назад

    jus got email null ( duliacte error again and again when I enter 2nd data)

  • @JigsawXop
    @JigsawXop 10 месяцев назад

    sir for pratice notes problem can we get soln? if we hv doubt

  • @props.Expert
    @props.Expert 4 месяца назад +1

    Keep It Up Good Work ❤

  • @Abhay14
    @Abhay14 9 месяцев назад

    bhaiya async await to samajh me aagya
    const savedPerson = await newPerson.save()
    but ye .save() kya h isse apne aap save ho jata h kya ?

  • @Thecodingdojo99
    @Thecodingdojo99 16 дней назад

    thanks bro all clear love you

  • @inboxkansal
    @inboxkansal 2 месяца назад

    You are awesome bro....

  • @Manoj_Jadhav.12
    @Manoj_Jadhav.12 10 месяцев назад

    Maza aagaya prince bhai

  • @yashu1703
    @yashu1703 10 месяцев назад +1

    Best video ❤

  • @anonymous090
    @anonymous090 9 месяцев назад

    Thank you bhaiya... learned a lot

  • @ManojDas-uf1zk
    @ManojDas-uf1zk 7 месяцев назад

    bhaiya baha pe humne as a Person model create kiya hai to people kaha se a gaya ye samjh nahi aya

  • @lohitkumarpatra6906
    @lohitkumarpatra6906 10 месяцев назад

    sir schema mobile type number hona chaiyeh na,string likha hai

  • @moinali9874
    @moinali9874 5 месяцев назад

    what command we will have to run to start server of mongodb in windows

    • @MuhammadFasih327
      @MuhammadFasih327 4 месяца назад +1

      mongod on command prompt then open another command prompt without closing first one and type mongosh make sure u have installed mongosh separately and extracted it with the server folder in mongod folder and created a data folder separately in the localdisk C and inside data create subfolder db.Hope it will resolve your issue

    • @moinali9874
      @moinali9874 4 месяца назад

      @@MuhammadFasih327 thanks bhai I will try this

  • @shubhamsingh-gb5zh
    @shubhamsingh-gb5zh 3 месяца назад +1

    Body parser->parsed data ko req.body me store karta hai

  • @vibha3031
    @vibha3031 7 месяцев назад

    40:20 mehnat se code smjha tha

  • @reeshusinghvlogs123
    @reeshusinghvlogs123 6 месяцев назад

    Sir server toh connect ho ja raha hai but database nahi ho raha node js se connect , db.on mai error aa raha hai ,,,,, plssssssss helpppp

  • @utpaltripathi9577
    @utpaltripathi9577 9 месяцев назад

    Simplified explanation

  • @this_is_Shreya
    @this_is_Shreya 3 месяца назад

    Nice explanation

  • @MohitRana-lc3pi
    @MohitRana-lc3pi 10 месяцев назад

    bhaiya aapka auto complete konsa extension hia

    • @kashifmurtaza9808
      @kashifmurtaza9808 10 месяцев назад

      Maybe this Vs code extension: Tabnine: AI Autocomplete & Chat for Javascript, Python, Typescript, PHP, Go, Java & more

  • @ADARSHKUMAR-pu9sn
    @ADARSHKUMAR-pu9sn 6 месяцев назад

    Bhaiya mongoose ko Nodejs server se connect karne pe error aa raha hai please help me

  • @Uvistix
    @Uvistix 6 месяцев назад

    Your the best🌟🌟🌟🌟🌟

  • @Kajalraghav-m8v
    @Kajalraghav-m8v 8 месяцев назад

    Really useful of me ❤

  • @thefourhourtalk
    @thefourhourtalk 4 месяца назад

    Error
    Cannot POST /person
    getting this error in postman

  • @abhishekpundir5941
    @abhishekpundir5941 10 месяцев назад

    Keep going 💪❤

  • @Manawwarsaifi-h5k
    @Manawwarsaifi-h5k 5 месяцев назад

    Bhai jab humne Person name se model banaya hai to collection "people" name se kyn bana hai ????

    • @manishchoudhary2722
      @manishchoudhary2722 4 месяца назад

      const person = mongoose.model('Person', personSchema, "Persons");
      third argument defines the model name, if you won't define then it pluralize the model name like (eg. Person, people)

  • @sakshirathod4158
    @sakshirathod4158 7 месяцев назад

    Please create frontend(react.js) playlist it would be very helpful for us.

  • @thefourhourtalk
    @thefourhourtalk 4 месяца назад +1

    no update showing on postman app :(

    • @HelloWorldbyprince
      @HelloWorldbyprince  4 месяца назад +1

      what's the error ?

    • @thefourhourtalk
      @thefourhourtalk 4 месяца назад

      @@HelloWorldbyprince resolved sir .. just letting you know that Ive started watching your linked list series as well ... there's no one else like you in teaching you know the exact pin point ki kaha hame dikkat ayegi and vo aane see pehle hi you clear it love you bhaiya thanks for this node ka series ..... will hopefully complete this till midnight love you bhaiya !!

  • @RahulRaj-vx7ov
    @RahulRaj-vx7ov 3 месяца назад

    Bhaiya plz plz ye bta dijie ki jo data mila hmlog ko mongoDB ke andar hotels folder ke andar usme , people naam ka collection khud hi kaise ban gya mere data ke liye, jabki hmlog people naam ka koi folder ya koi collection nhi banaye the 😢
    Plz bhaiya bta dijie help ❤
    From koderma jharkhand

  • @SahilKumar-xz1xs
    @SahilKumar-xz1xs 6 месяцев назад

    where can i get these notes

  • @mukulkumar5133
    @mukulkumar5133 10 месяцев назад +1

    good same like 3L course

  • @abhishekkumarmehta743
    @abhishekkumarmehta743 10 месяцев назад

    5:40 (node:5056) [MONGODB DRIVER] Warning: useNewUrlParser is a deprecated option: useNewUrlParser has no effect since Node.js Driver version 4.0.0 and will be removed in the next major version
    (Use `node --trace-warnings ...` to show where the warning was created)
    (node:5056) [MONGODB DRIVER] Warning: useUnifiedTopology is a deprecated option: useUnifiedTopology has no effect since Node.js Driver version 4.0.0 and will be removed in the next major version
    No need to pass the parameter 👍

    • @sheshram3934
      @sheshram3934 10 месяцев назад

      bro mere me keval "listening on port 3000" show ho rha jbki sara same kiya hu according to lecture but mera me db.js wla file ka listenrs jaise ki "Connected to MongoDB server"' y sb show nhi ho rha please help me ?????

    • @aniruddhakotal1534
      @aniruddhakotal1534 10 месяцев назад

      @@sheshram3934 same here bro. Mera directly after some time disconnected aa raha hai ..

    • @ArunSingh-vq6wg
      @ArunSingh-vq6wg 9 месяцев назад

      just remove the two lines
      write just mongoose.connect(mongoURL)

    • @poojabhadke5643
      @poojabhadke5643 9 месяцев назад

      ​@@sheshram3934 Mera b same ho raha h

    • @poojabhadke5643
      @poojabhadke5643 9 месяцев назад

      ​@@sheshram3934slove kaise kiya

  • @AMRESHKUMAR-ol9ei
    @AMRESHKUMAR-ol9ei 10 месяцев назад

    bhaiya ye apka document wala notes kahan se access karun ??
    uske wazah se aage nhi badh pa ra hun..
    any one please provide me >>>>.......

    • @HelloWorldbyprince
      @HelloWorldbyprince  9 месяцев назад

      Notes Link: - topmate.io/helloworldbyprince/726605

  • @VasuSharma-r5z
    @VasuSharma-r5z 10 месяцев назад

    Thank you bhaiya 💙🎉

  • @AdityaKumar-ky8eo
    @AdityaKumar-ky8eo 7 месяцев назад

    run hi nahi ho pa rha h code
    error while connecting to the database

  • @momentos811
    @momentos811 8 месяцев назад

    sir please explain in details like you don't told us in previous lecture we have to install mongoshell and now 😢brew service not running

    • @HelloWorldbyprince
      @HelloWorldbyprince  8 месяцев назад

      Bro i have told you that
      You have to install mongodb completely then after you can proceed with further lecture
      Try to google these things