Connect MongoDB Atlas to your Heroku application

Поділитися
Вставка

КОМЕНТАРІ • 98

  • @abdelrhmanshokr7546
    @abdelrhmanshokr7546 3 роки тому +1

    I keep coming back to this video when ever I'm confused or with the start of any new project I wanna deploy thanks a lot :)

    • @karlnassar8646
      @karlnassar8646 3 роки тому

      How are you connecting the DB even after mLab is discontinued? please help! Thanks

  • @prateekrajput2646
    @prateekrajput2646 2 роки тому

    Thank you so much
    wasted so much time here and there
    2 min from this video saved so much of time
    God bless you legend
    Love from India 🇮🇳

  • @tiekto4253
    @tiekto4253 4 роки тому +9

    Thank you so much Sir! In only a mere 4 minutes, you've answered all the questions I had and even more :)

  • @olatunbosundare8865
    @olatunbosundare8865 4 роки тому +1

    Your video saved me.... Thank you very much... Pro-tip, if still having issues, use the heroku cli to see what is going on.

  • @bugraates478
    @bugraates478 3 роки тому

    I spent 3 hours just to set the database connect string (mongo atlas in this case) from the built-in console which is comes with VS Code. I tried and i cannot solve the problem. And I opened this video and it only took a minute. I can't believe that it is that easy to set it from the heroku's website. Thank you so much.. (by the way the error was caused from & symbol because powershell cannot send it,)

  • @joeyvico
    @joeyvico 4 роки тому +1

    Brilliant! Solved the problem I had in less than two minutes into the video. Thank you so much

  • @christianlejeune5540
    @christianlejeune5540 4 роки тому +10

    Great series of videos! Thanks!
    One question: how should we go about whitelisting Heroku fro my cluster in Mongo Atlas?
    My understanding is that not everything should be whitelisted. Any advise?
    Again congrats on this great material! New fan here for sure!

  • @maiuranloganathan4785
    @maiuranloganathan4785 4 роки тому +1

    Been struggling with this for hours and this solved it! Thanks a ton mate!

  • @kennethpineda6143
    @kennethpineda6143 3 роки тому

    THANK YOU VERY MUCH YOU SAVE MY DAY! I have been straggling for how many days if I gitignore my .env or not

  • @danielroyston-lopez3147
    @danielroyston-lopez3147 4 роки тому +15

    what if I am using the whitelisting feature on mongodb atlas? Heroku has dynos with dynamic ip tables. I tried a third party static ip router but it didnt work.

    • @dg-cg5gi
      @dg-cg5gi 2 роки тому

      Any luck, still stuck on this.

  • @jaronkunkel
    @jaronkunkel 4 роки тому +2

    Thank you so much for posting this video! It helped me get an app I'm building for a Udemy course to finally deploy.

  • @Abdulkadir-vb3vj
    @Abdulkadir-vb3vj 3 роки тому +1

    Thank you really, helpful video. Heroku and MongoDB Atlas updated their settings for connection as of 2021. Do you mind making a second video on this?

  • @artembelyshev9467
    @artembelyshev9467 4 роки тому +2

    Thank you man! So useful and simple content :)

  • @amandubey5287
    @amandubey5287 2 роки тому

    The intro is fire tho

  • @ThaoNguyen-nd7oj
    @ThaoNguyen-nd7oj 2 роки тому +1

    thank you, it is very easy to understand :>

  • @amandamcbee7016
    @amandamcbee7016 2 роки тому

    Thanks so much, this was very helpful!

  • @benjabenjabenja
    @benjabenjabenja 3 роки тому

    YOU SAVED MY LIFE

  • @hovhannespetrosyan1916
    @hovhannespetrosyan1916 4 роки тому

    you are great men , your content helped me to understand all much better , thank you so much , i will subscribe to your channel and follow you forever heheh , thank you for your support

  • @jastagarbrar2315
    @jastagarbrar2315 2 роки тому

    Great help, thank you soo much.

  • @citizendot1800
    @citizendot1800 4 роки тому

    Really, Your tutorial is the best ever I had seen, Nice Intro + Good explanation minding beginners from start to end.
    I had one small doubt. How does , the data is stored in "blogposts" collection. As far as I remember, We didn't named it anywhere.
    Could you point me, to where we mentioned the name of collection "blogposts"?
    Once again, Thank you So much Sir, We're all grateful to you.

  • @jhjhj2172
    @jhjhj2172 3 роки тому

    veeeeeryy veeeery thank you siiiir

  • @ntigirishari
    @ntigirishari 3 роки тому

    Thanks so much!! Well explained!

  • @oimiyazaki1
    @oimiyazaki1 4 роки тому +1

    Thank you so much!

  • @sachinmags9605
    @sachinmags9605 4 роки тому

    thank you man you saved my day

  • @yu-linchung5771
    @yu-linchung5771 4 роки тому +1

    Man you saved my day!

  • @brunocruz2609
    @brunocruz2609 4 роки тому

    Thank you very much, you help me a lot

  • @ahmedboutaraa8771
    @ahmedboutaraa8771 4 роки тому +1

    but i think youtube should consider adding something like this after seeing your tutorials

  • @hlong22
    @hlong22 3 роки тому

    thank you!

  • @hughe1504
    @hughe1504 2 роки тому

    i love you bruh

  • @griciugriger4565
    @griciugriger4565 Рік тому

    How to connect to MongoDB Atlas if it requires IP address to be whitlisted but Heroku assigns IP Address to the application randomly?

  • @HorbachenkoVlad
    @HorbachenkoVlad 3 роки тому

    I have a problem. When i run it locally it works. It saves all the data to db. But when i push it to heroku it doesn't connect to my db(

  • @paolo-1283
    @paolo-1283 4 роки тому

    Hi i followed your tutorial from start to finish but using MongoDb Atlas, my app is running in heroku but i am confuse why i don't have anything stored or recorded in settings/configure variables. I am using enviroment viriables in my server.

  • @bhaveshgupta2776
    @bhaveshgupta2776 4 роки тому

    It is not typo just want to confirm. Do we need to cluster name somewhere in the app

  • @LuisRadaAlean
    @LuisRadaAlean 3 роки тому

    0:47 it starts... You are welcome

  • @mcduck3724
    @mcduck3724 2 роки тому

    at this time, on Heroku, I cannot modify the url. do you know how can we do?

  • @SinaGilassi
    @SinaGilassi 4 роки тому

    Good Job

  • @ahmedchouihi
    @ahmedchouihi 3 роки тому

    I want to migrate in the reverse side from heroku to Mongodb

  • @777EXZERO
    @777EXZERO 4 роки тому

    i got my cluster in the mongodb atlas, and a heroku, the question is, works with python in the heroku? thanks for the answer my quiestion

  • @karlnassar8646
    @karlnassar8646 3 роки тому

    what should I do if mLab mongoDb is discontinued? Please help

  • @zibanchau1470
    @zibanchau1470 4 роки тому

    Excuse me,what relationship between heroku and those js codes?

  • @notyournormaldev1419
    @notyournormaldev1419 2 роки тому

    How to seed data in mongo in heroku

  • @RahulGupta-pj1ux
    @RahulGupta-pj1ux 4 роки тому

    if i use Atlas i need not need to add addones in heroku? right?

  • @truepicksyt3323
    @truepicksyt3323 2 роки тому

    is deploying a server using mongo db free on heroku?

  • @jackendycherenfant3929
    @jackendycherenfant3929 3 роки тому

    Thanks, my question is "Why" if Heroku Mlab is working why do you change it to MongoDB Atlas?

  • @shubhammehra2598
    @shubhammehra2598 4 роки тому

    and i also get an error when i change the MONGODB_URI with monogdb:// from the changing the nodejs driver to 2.2.12 version +later the i got the error "Error [MongoError]: no valid replicaset members found" help me please

  • @digvijay.rathore
    @digvijay.rathore 4 роки тому

    It isn't connecting with the URI provided by Atlas as Atlas need the IP which is going to access the cluster which we don't have and aslo you haven't shown that in video. No help with this video.

  • @jr-yn4lk
    @jr-yn4lk 4 роки тому

    Thank you, good sir. By doing this, doesn't heroku has access to the password for my database ?

    • @akhilr94
      @akhilr94 4 роки тому

      It's an environment variable, it will not be stored in heroku, it'll be stored in your app's instance.

  • @supreme-erg9875
    @supreme-erg9875 4 роки тому

    uhh its not working do i need the "|| mongodb://localhost" in my code

  • @ayeshashaikh5039
    @ayeshashaikh5039 3 роки тому

    application error ???

  • @dylaninfinity9756
    @dylaninfinity9756 4 роки тому

    I'm currently having an issue connecting MongoDB Atlas to Heroku. I believe the problem lies in the fact the Heroku app has its own ip address which isn't whitelisted within my MongoDB Account. How did you overcome this barrier? Did you use something like Heroku's "Fixie Socks" addon which allows you to establish a TCP connection using a static IP? Or did you just whitelist AWS' entire range for your region?
    Right now the only reasonable solutions I'm finding involve routing my traffic through a static IP using something like Fixie Socks, or get Heroku Enterprise to make use of their private spaces. And the second option isn't really a viable option for my circumstances. Fixie Socks happened to not have any documentation on MongoDB, so I'm in the process of branching out my search which is how I landed on this video. If it comes to it I'll just look more deeply into how to establish a TCP connection through a static IP using mongoose, but I was curious if you or anyone had any tips?
    Edit: For more information on my error, this is the error I'm getting exactly:
    name: 'MongoNetworkError',
    errorLabels: [ 'TransientTransactionError' ],
    [Symbol(mongoErrorContextSymbol)]: {}
    As for Heroku the initial get request to "/" times out:
    at=error code=H12 desc="Request timeout" method=GET path="/" host=auth-presentation.herokuapp.com request_id=fa3ec14d-510d-47bb-942c-38e671bdbd2e fwd="70.168.101.174" dyno=web.1 connect=0ms service=30001ms status=503 bytes=0 protocol=https
    Though, interestingly enough I do get the favicon.ico image successfully and it displays properly on the browser tab:
    at=info method=GET path="/favicon.ico" host=auth-presentation.herokuapp.com request_id=99d8f669-4387-4c58-a036-380c4413fff5 fwd="70.168.101.174" dyno=web.1 connect=1ms service=18ms status=200 bytes=22661 protocol=https
    There is some extra information prior to that mongo error, where mongo realizes it can't get a write lock which is likely deriving from the fact it isn't authorized (since the IP isn't whitelisted). I've also seen this error before in the development phase and usually it just meant my physical IP address wasn't whitelisted. Being that I made sure to delete and then re-whitelist my current geographic IP address in MongoDB Atlas I'm pretty sure it would be on the Heroku side of things.
    One thing possibly of note is that my Heroku app nor my actual application don't have an SSL certificate, I don't know if that is a possible issue.

    • @accimeesterlin
      @accimeesterlin  4 роки тому

      Hey Dylan,
      Fixie socks documentation sucks.Proximo might be a better alternative for your case. here is a link to Proximo addons elements.heroku.com/addons/proximo . However they do have a monthly subscription at $5 .
      My recommendation would be to give Proximo a try, and see if that works for you, if not then you'll definitely need to use the Heroku Enterprises in order to make use of their private spaces.

  • @राहुलयादव-स5ट

    Do we need to keep the ip address 0.0.0.0 or personal pc ip address in mongodb atlas network settings?

    • @hugochen121
      @hugochen121 4 роки тому +2

      if u wanna use heroku, 0.0.0.0 is necessary, 0000 means all IP, and you dont know what IP heroku is using

  • @xenon4602
    @xenon4602 4 роки тому

    How do you whitelist the heroku IP ?

    • @Ballissle
      @Ballissle 3 роки тому

      did you find a solution? If so, would you mind sharing how to do it?

  • @ahmedboutaraa8771
    @ahmedboutaraa8771 4 роки тому

    unless having multiple account

  • @ponrajs5396
    @ponrajs5396 4 роки тому

    it throws error, The "dnspython" module must be installed to use mongodb+srv:// URIs, but in local i can fix this bu install pip install pymongo[srv] but how could i do that in heroku?. In heroku still this throws an error

    • @dundundun5839
      @dundundun5839 4 роки тому +1

      Install the module dnspython pip install dnspython==2.0.0 (or latest version) and add to your requirements text file and just push it to heroku master :)

    • @ponrajs5396
      @ponrajs5396 4 роки тому

      @@dundundun5839 I just removed srv and it works

    • @dundundun5839
      @dundundun5839 4 роки тому +1

      @@ponrajs5396 Oh when I got the error I just installed dnspython and it worked :)

    • @ponrajs5396
      @ponrajs5396 4 роки тому

      @@dundundun5839 👍

    • @rohan1765
      @rohan1765 4 роки тому

      In my case it says name process is not defined please help.

  • @shubhammehra2598
    @shubhammehra2598 4 роки тому

    i get an error that heroku give me error "Error: Invalid mongodb uri. Must begin with "mongodb://" can you tell me how can i overcome this

    • @techobserver8578
      @techobserver8578 4 роки тому

      make sure you're using a current version of mongoose

    • @accimeesterlin
      @accimeesterlin  4 роки тому

      Thanks for chiming in TechObserver.

    • @accimeesterlin
      @accimeesterlin  4 роки тому

      Are you still having this issue?

    • @fatihtas88
      @fatihtas88 3 роки тому

      @@accimeesterlin I am having indeed. Is my heroku dyno have mongoose? if so how can i update that?
      I am trying to switch from mlab btw. But after migration steps, I encounter Must begin with "mongodb://" error as well.. Is it because i use rails 4 and so on versions? I don't want to upgrade rails just to be able to make migration

  • @jaydipdey9162
    @jaydipdey9162 3 роки тому

    H10 error is coming

  • @ahmedboutaraa8771
    @ahmedboutaraa8771 4 роки тому

    i want to subscribe two times to your channel but i think there is no way to do it

  • @rishiktiwari
    @rishiktiwari 3 роки тому

    How to whitelist heroku app in atlas? I do not want to make it open to everyone

    • @Ballissle
      @Ballissle 3 роки тому

      did you find a solution to this?

    • @rishiktiwari
      @rishiktiwari 3 роки тому

      @@Ballissle Not yet!
      If you can setup a http proxy in your heroku app and then route all I/Os through it and whitelist it in Atlas.
      Also, check out QuotaGuard it seems do something like that, I haven't tried it yet.

    • @Ballissle
      @Ballissle 3 роки тому

      @@rishiktiwari I found a simple fix to just allow all locations instead of singular ips which works fine for what I need but thanks

    • @rishiktiwari
      @rishiktiwari 3 роки тому

      @@Ballissle Yes, you can always wild card it. But that comes at a cost of bots spamming and trying to access the data on Atlas.

    • @Ballissle
      @Ballissle 3 роки тому +1

      @@rishiktiwari yeah I'm aware of that. Luckily my bot is only on one server location and it isn't very big so unlikely for anything to happen. If it does ill just take it offline and probably change the password or something. At least until I can find a better way to run it more securely. But the database data doesn't hold anything too valuable anyway.

  • @pokethepenguin2
    @pokethepenguin2 4 роки тому

    Hi, I have a seperate client.js file for handling the static page and I can't figure out what to fetch() to since the PORT is on the server.js file. Do you know how I can fix this? Thanks. I was essentially following this tutorial: github.com/CodingGarden/meower

  • @giladfuchs2377
    @giladfuchs2377 4 роки тому

    Anyone please help!!
    it's doesn't work for me and I don't have any idea why..
    I'm getting MongooseTimeoutError
    github.com/igilfu/MyFirstWeb
    this is my project ant it's work me locally.
    I do exactly the same like this video

  • @АлександрИванов-ц6ф4в

    i cant find mLab whats wrong in 2021