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,)
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!
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.
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
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.
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.
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
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.
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.
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.
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
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 :)
@@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
@@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.
@@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.
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
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
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 :)
How are you connecting the DB even after mLab is discontinued? please help! Thanks
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 🇮🇳
Thank you so much Sir! In only a mere 4 minutes, you've answered all the questions I had and even more :)
That’s good to hear Tiekto
Your video saved me.... Thank you very much... Pro-tip, if still having issues, use the heroku cli to see what is going on.
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,)
Brilliant! Solved the problem I had in less than two minutes into the video. Thank you so much
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!
SAME!!! any news?
Did you figure this out?
Been struggling with this for hours and this solved it! Thanks a ton mate!
THANK YOU VERY MUCH YOU SAVE MY DAY! I have been straggling for how many days if I gitignore my .env or not
Is mlab addon still present?
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.
Any luck, still stuck on this.
Thank you so much for posting this video! It helped me get an app I'm building for a Udemy course to finally deploy.
You’re welcome Jaron
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?
Thank you man! So useful and simple content :)
The intro is fire tho
thank you, it is very easy to understand :>
Thanks so much, this was very helpful!
YOU SAVED MY LIFE
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
Great help, thank you soo much.
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.
veeeeeryy veeeery thank you siiiir
Thanks so much!! Well explained!
Glad it was helpful!
Thank you so much!
thank you man you saved my day
Man you saved my day!
Glad to hear that
Thank you very much, you help me a lot
but i think youtube should consider adding something like this after seeing your tutorials
Yeah they should :)
thank you!
i love you bruh
How to connect to MongoDB Atlas if it requires IP address to be whitlisted but Heroku assigns IP Address to the application randomly?
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(
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.
It is not typo just want to confirm. Do we need to cluster name somewhere in the app
0:47 it starts... You are welcome
at this time, on Heroku, I cannot modify the url. do you know how can we do?
Good Job
I want to migrate in the reverse side from heroku to Mongodb
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
Same , any news?
what should I do if mLab mongoDb is discontinued? Please help
Excuse me,what relationship between heroku and those js codes?
How to seed data in mongo in heroku
if i use Atlas i need not need to add addones in heroku? right?
is deploying a server using mongo db free on heroku?
Thanks, my question is "Why" if Heroku Mlab is working why do you change it to MongoDB Atlas?
Mlab was bought by MongoDB and everyone should be migrating to Atlas.
@@stevenbeeckman3019 thanks
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
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.
Thank you, good sir. By doing this, doesn't heroku has access to the password for my database ?
It's an environment variable, it will not be stored in heroku, it'll be stored in your app's instance.
uhh its not working do i need the "|| mongodb://localhost" in my code
application error ???
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.
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.
Do we need to keep the ip address 0.0.0.0 or personal pc ip address in mongodb atlas network settings?
if u wanna use heroku, 0.0.0.0 is necessary, 0000 means all IP, and you dont know what IP heroku is using
How do you whitelist the heroku IP ?
did you find a solution? If so, would you mind sharing how to do it?
unless having multiple account
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
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 :)
@@dundundun5839 I just removed srv and it works
@@ponrajs5396 Oh when I got the error I just installed dnspython and it worked :)
@@dundundun5839 👍
In my case it says name process is not defined please help.
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
make sure you're using a current version of mongoose
Thanks for chiming in TechObserver.
Are you still having this issue?
@@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
H10 error is coming
i want to subscribe two times to your channel but i think there is no way to do it
hhahahah
How to whitelist heroku app in atlas? I do not want to make it open to everyone
did you find a solution to this?
@@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.
@@rishiktiwari I found a simple fix to just allow all locations instead of singular ips which works fine for what I need but thanks
@@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.
@@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.
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
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
i cant find mLab whats wrong in 2021
They remove it
@@accimeesterlin so what about this video
@@accimeesterlin hi any update?