MongoDB (Atlas) connection using Node

แชร์
ฝัง
  • เผยแพร่เมื่อ 7 ม.ค. 2025

ความคิดเห็น • 99

  • @saturdaydeveloper8556
    @saturdaydeveloper8556  4 ปีที่แล้ว

    Like, Comment and share the video. Subscribe my channel.
    Also give your suggestions what should be the topic for next video.
    For User authentication with JWT, Express and mongo check my story on medium =>
    medium.com/@rempire230/user-authentication-with-jwt-using-node-express-and-mongo-db-altas-f0256232abb1

    • @tonywest9146
      @tonywest9146 4 ปีที่แล้ว

      Hello how can I add the get route
      So that i can retrieve my posts

  • @experiencelife7683
    @experiencelife7683 4 ปีที่แล้ว +4

    To the point! I have watched several videos but this is what I needed..

  • @VidyaSagar-hc9nu
    @VidyaSagar-hc9nu 4 ปีที่แล้ว +1

    thank you soooo much
    you saved my time
    i feel so headache to access the database
    now I get it from your video

  • @syedsajjad550
    @syedsajjad550 3 ปีที่แล้ว

    Thank You so much sir for creating this content, this is very helpful for me.

  • @pranavhegde6470
    @pranavhegde6470 3 ปีที่แล้ว

    Thank you so much for the crisp and clear tutorial!

  • @SwatiTiwari2611
    @SwatiTiwari2611 4 ปีที่แล้ว +1

    Thank you very much.. I was struggling for such video.. 😊👍

  • @HealthWealthAndLove
    @HealthWealthAndLove 3 ปีที่แล้ว

    thank you brosky! very clear tutorial.

  • @HK-sw3vi
    @HK-sw3vi 4 ปีที่แล้ว +3

    LOVELY! Just what I needed

  • @nikosroom1913
    @nikosroom1913 3 ปีที่แล้ว +1

    EXACTLY what I needed thank you so much

  • @tienphan6259
    @tienphan6259 3 ปีที่แล้ว

    finaly i found this video, thank you so much

  • @The_Soup_Wizard
    @The_Soup_Wizard 4 ปีที่แล้ว

    13:56 line 12 `module.exports = User = mongoose.model('user', user);` shows me an error for `User` saying it must be defined. My code looks exactly the same and I still get that error, could this be due to some type of change to how Mongoose works or is there something I'm missing?

  • @pratikshabhavsar6043
    @pratikshabhavsar6043 3 ปีที่แล้ว

    Simple & Provides appropriate material :) Thank you

  • @mirzaalam1980
    @mirzaalam1980 3 ปีที่แล้ว

    Hello, did anyone implement "get method" for this project? Thanks in advance.

  • @atisafarkhah5923
    @atisafarkhah5923 3 ปีที่แล้ว

    thank you very much for this helpful video! exactly what I wanted to have!

  • @carloscardenas8393
    @carloscardenas8393 3 ปีที่แล้ว

    How connectDB is related with the schema? I can see that you don't need to open or close a connection

  • @luisantos1986
    @luisantos1986 4 ปีที่แล้ว

    Works like a charm, thak you very much!!!!!

  • @evergreenfashionevergreenf7340
    @evergreenfashionevergreenf7340 4 ปีที่แล้ว

    It was superb helpful...thanks a lot

  • @inhibited44
    @inhibited44 3 ปีที่แล้ว

    I tried your db connection statements, without a DB folder, in my server.js file. Couldn't connect to the database. Then I tried them in the DB folder under connections.js and imported using require into server.js . Shouldn't be a difference that I know of, but then it worked fine. I don't get it, but will remember to use DB/connections.js

  • @buteranelly
    @buteranelly 3 ปีที่แล้ว

    Thanks man! really helpful

  • @anycaroliny7900
    @anycaroliny7900 3 ปีที่แล้ว

    Helped me a lot!!!!! Tks :)

  • @dicksonpwc
    @dicksonpwc 3 ปีที่แล้ว +1

    Would you write a sample of how to create get, push and delete API? Thank you!!

    • @saturdaydeveloper8556
      @saturdaydeveloper8556  3 ปีที่แล้ว

      th-cam.com/play/PLaXdjrOMd1wriZEBTnjwtm1pM7h_qZ1aZ.html
      Please, check this playlist.

  • @habeebolakunle7509
    @habeebolakunle7509 4 ปีที่แล้ว +1

    I really love this.
    Thanks a lot.
    Now that we've learnt how to get data variables into the mongo DB, how do we get to fetch the same data variables out to our front end still using "ejs"

  • @hariharann9400
    @hariharann9400 4 ปีที่แล้ว

    Hello Saturday,
    i tired as per you taught, but i threw an err while POST the data using postman. "TypeError: Cannot destructure property 'firstName' of 'req.body' as it is undefined.". Could you please help to sort it out.

    • @saturdaydeveloper8556
      @saturdaydeveloper8556  4 ปีที่แล้ว

      Please check your req.body.
      Add breakpoint or print it inside console.
      Make sure you are receiving first name there.
      If not, you might be not sending it when you are calling API

    • @hariharann9400
      @hariharann9400 4 ปีที่แล้ว +1

      @@saturdaydeveloper8556 Thank you so much man.

    • @saturdaydeveloper8556
      @saturdaydeveloper8556  4 ปีที่แล้ว

      Welcome!
      Keep supporting channel

    • @sourav6645
      @sourav6645 4 ปีที่แล้ว

      Hi I am facing the same problem too with postman not sure where I am going wrong
      I am sending POST req with raw data
      used the cloned code from yours repo

  • @astrix8812
    @astrix8812 4 ปีที่แล้ว

    Good stuff man. Thanks for the tutorial, it was really helful

  • @pncnaveen
    @pncnaveen 4 ปีที่แล้ว

    Hi! I just started with MongoDB and while connecting with the DB, I am getting an error "ETIMEOUT". The connection was working fine then this happened. I cannot understand the issue and the DB is status is OK. Help me through this. Thanks.

    • @saturdaydeveloper8556
      @saturdaydeveloper8556  4 ปีที่แล้ว

      Whitelist your public IP again, inside network access at cluster mongo db.
      You can allow access from anywhere as well, so you will not need to whitelist up again and again

    • @pncnaveen
      @pncnaveen 4 ปีที่แล้ว

      Tired that too and it did not work

  • @farhanhaider5652
    @farhanhaider5652 4 ปีที่แล้ว

    this worked for me! Thanks a lot!

  • @makintola
    @makintola 4 ปีที่แล้ว

    Thank you man! you just saved a life!!!

  • @tupaichitrak762
    @tupaichitrak762 5 ปีที่แล้ว

    many many thanks to making the video...it really help everyone

  • @andresdavidlondonohincapie5235
    @andresdavidlondonohincapie5235 4 ปีที่แล้ว

    I tried doing what u did whot postman but I get a message saying it could not send the request

  • @xxdreadsaintxx
    @xxdreadsaintxx 5 ปีที่แล้ว

    Thanks Saturday! This was really helpful

  • @annakurenkova3565
    @annakurenkova3565 4 ปีที่แล้ว

    I tried this and I am getting the same error as I did in my node homework before - "cannot get /", this error pops up a lot when I am following instructions extremely closely, somehow the result is always the same. Can you please explain why I might be getting the error?

    • @saturdaydeveloper8556
      @saturdaydeveloper8556  4 ปีที่แล้ว

      Let's connect over linked in
      You can find my profile in channel description

  • @sskview7471
    @sskview7471 3 ปีที่แล้ว

    u helped me lot ...thanks

  • @snehaparab2638
    @snehaparab2638 2 ปีที่แล้ว

    why do i get an error saying connectDB IS NOT A FUNCTION.. HELP ME OUT PLS

    • @snehaparab2638
      @snehaparab2638 2 ปีที่แล้ว

      OK I GOT IT FIXED, REMOVED THE AWAIT

  • @ulissesbrandao706
    @ulissesbrandao706 4 ปีที่แล้ว

    A thank you from Brazil

  • @xoundful
    @xoundful 4 ปีที่แล้ว

    thanks a lot, how do u get data from database and display it as html using get?

    • @saturdaydeveloper8556
      @saturdaydeveloper8556  4 ปีที่แล้ว

      Use fetch method to call api, then you can simply display data in your html using html element id

    • @xoundful
      @xoundful 4 ปีที่แล้ว

      @@saturdaydeveloper8556 thanks

  • @zhivaroopan714
    @zhivaroopan714 4 ปีที่แล้ว

    Thanks a lot man I really needed this

  • @saurabhprasad
    @saurabhprasad 2 ปีที่แล้ว +1

    (node:15600) UnhandledPromiseRejectionWarning: MongoAPIError: URI must include hostname, domain name, and tld

  • @ichsanmaulana2728
    @ichsanmaulana2728 4 ปีที่แล้ว

    amazing work! thankyou much

  • @Xsameie99X
    @Xsameie99X 4 ปีที่แล้ว

    But how can i get the data from the website

  • @soniatp9330
    @soniatp9330 4 ปีที่แล้ว

    hello sir, when i run the server, the server is started. But it doesn't connect to my db. (node:2192) UnhandledPromiseRejectionWarning: Error: queryTxt ETIMEOUT cluster0.kas9b.gcp.mongodb.net

  • @kanchanakumari241
    @kanchanakumari241 5 ปีที่แล้ว +1

    Thank you so much... It helped a lot

  • @mataal8770
    @mataal8770 4 ปีที่แล้ว +2

    Hi I cant udnerstand what you were explaining regarding this code>>> const Port = process.env.Port || 3000; If possible can you explain it in more detail its really vague. Appreciate it a lot if you can thanks for this.

    • @saturdaydeveloper8556
      @saturdaydeveloper8556  4 ปีที่แล้ว +3

      Locally we are using port 3000, as we know this port is available.
      But at time of deployment, you will not know which prot is available to run server.
      So, at that time it will help to get port from environment

    • @mataal8770
      @mataal8770 4 ปีที่แล้ว

      @@saturdaydeveloper8556 oops i thought i deleted this already anyway thanks. Instead of asking this shoulld have googled it . Anyway ty a lot

  • @43_kalathiya_darshan11
    @43_kalathiya_darshan11 5 ปีที่แล้ว

    sir,other request put etc posibale ?

  • @manikandan-zl1ki
    @manikandan-zl1ki 4 ปีที่แล้ว

    Thank you very much bro

  • @hariharannagarajan6739
    @hariharannagarajan6739 4 ปีที่แล้ว

    Hi,
    i am new to node js. i gone through the video, it help me a lot. i have one doubt though, i got an error, "MongooseServerSelectionError: Could not connect to any servers in your MongoDB Atlas cluster", Kindly help to fix this issue.
    Kindly help me to fix this issue

    • @saturdaydeveloper8556
      @saturdaydeveloper8556  4 ปีที่แล้ว

      Find your public IP on Google.
      Go to network access on mongo db altas site and paste your IP
      It will white list your ip

    • @hariharannagarajan6739
      @hariharannagarajan6739 4 ปีที่แล้ว

      @@saturdaydeveloper8556 Yeah..! it works, thanks for the quick help.

    • @saturdaydeveloper8556
      @saturdaydeveloper8556  4 ปีที่แล้ว

      @@hariharannagarajan6739
      Welcome!
      Keep supporting channel

    • @hariharannagarajan6739
      @hariharannagarajan6739 4 ปีที่แล้ว

      Were you post any videos for front end to be connected with this back end video?

  • @ndirpaya
    @ndirpaya 4 ปีที่แล้ว

    Hey man, pretty amazing resource. im going to be building a web app for scale and needed to know if mongodb atlas is a preferred option than the local mongodb server. thanks for the tutorial.

  • @rajatpanwar1568
    @rajatpanwar1568 5 ปีที่แล้ว

    Well done Saturday developer

  • @hamzacanbaz7323
    @hamzacanbaz7323 4 ปีที่แล้ว

    I cannot get firstname and lastname however I can get id

  • @sony4481
    @sony4481 4 ปีที่แล้ว

    Very Good!!

  • @राहुलयादव-स5ट
    @राहुलयादव-स5ट 4 ปีที่แล้ว

    helped alot. Thanks for tutorial........

  • @babuibrar
    @babuibrar 4 ปีที่แล้ว

    Thank You So much.

  • @jumbo999614
    @jumbo999614 4 ปีที่แล้ว

    what is postman?

  • @judesamuelescol4726
    @judesamuelescol4726 4 ปีที่แล้ว

    Thank you so much sir!

  • @pavanms7809
    @pavanms7809 4 ปีที่แล้ว

    awesome, very clear

  • @JacoOlwagen
    @JacoOlwagen 4 ปีที่แล้ว

    Thank You!

  • @denizkarakas8170
    @denizkarakas8170 2 ปีที่แล้ว

    thanks a lot

  • @deepaksivakumar6371
    @deepaksivakumar6371 4 ปีที่แล้ว

    Hii bro i am facing difficult in solving following error
    querySrv EREFUSED _mongodb._tcp.cluster0.t3lxr.mongodb.net

  • @sumitkaushik999
    @sumitkaushik999 5 ปีที่แล้ว

    Keep going on!!

  • @abhishekmishra531
    @abhishekmishra531 5 ปีที่แล้ว

    Gr8, I will help to everyone

  • @ambujsingh7173
    @ambujsingh7173 4 ปีที่แล้ว

    awesome

  • @hcorp560
    @hcorp560 3 ปีที่แล้ว

    2:05

  • @laibasubwayprincessRunner3D
    @laibasubwayprincessRunner3D 4 ปีที่แล้ว

    hi please can you help me
    i face some problem

  • @43_kalathiya_darshan11
    @43_kalathiya_darshan11 5 ปีที่แล้ว

    Very nice..!!

  • @tuankieno2761
    @tuankieno2761 4 ปีที่แล้ว

    thank you

  • @conghaule1402
    @conghaule1402 4 ปีที่แล้ว +1

    errros SyntaxError: await is only valid in async function :((((

  • @shivanirajput7840
    @shivanirajput7840 5 ปีที่แล้ว

    Nice video

  • @43_kalathiya_darshan11
    @43_kalathiya_darshan11 5 ปีที่แล้ว

    then postman find opratione posible

  • @iamroy91011
    @iamroy91011 4 ปีที่แล้ว

    I liked the video. Can you please tell me how to terminate my cluster and delete my atlas account. this would be helpful.

    • @saturdaydeveloper8556
      @saturdaydeveloper8556  4 ปีที่แล้ว

      docs.atlas.mongodb.com/tutorial/delete-atlas-account/
      I suppose this link will help you

    • @iamroy91011
      @iamroy91011 4 ปีที่แล้ว

      @@saturdaydeveloper8556 hello sir thanks for your response, but I am still not clear on the procedure. If you can make a video on this topic would be really appreciated

  • @vijaysingh-ln5te
    @vijaysingh-ln5te 5 ปีที่แล้ว

    Good

  • @nguyenvannam5235
    @nguyenvannam5235 4 ปีที่แล้ว

    thanks

  • @saurabhprasad
    @saurabhprasad 2 ปีที่แล้ว

    (node:15600) UnhandledPromiseRejectionWarning: MongoAPIError: URI must include hostname, domain name, and tld.////help me