Sank6 / Discord-Bot-List

Just another botlist for discord
GNU General Public License v3.0
213 stars 185 forks source link

issue with connecting mongo db #282

Closed terriblecoder1 closed 4 years ago

terriblecoder1 commented 4 years ago

can anyone help me connect mongodb? I am also having issues with deploying the site it gives me error and i'm not sure what to do

issue-label-bot[bot] commented 4 years ago

Issue-Label Bot is automatically applying the label question to this issue, with a confidence of 0.87. Please mark this comment with :thumbsup: or :thumbsdown: to give our bot feedback!

Links: app homepage, dashboard and code for this bot.

Sank6 commented 4 years ago

Can you send the error(s)

terriblecoder1 commented 4 years ago

https://gyazo.com/74e19b811f8d35b82f3adcfbd37ab5c4

I also need help setting up the config and connecting mongo db, your tutorial wasn't too understanding for me and got me confused.

terriblecoder1 commented 4 years ago

new error: https://gyazo.com/3a39937d0afcfc0b304438d39f6aa4dc

terriblecoder1 commented 4 years ago

I am also not sure how to connect discord api and stuff

terriblecoder1 commented 4 years ago

Now its working for me but I want to know how to access my mongodb cluster so I can view my website

Sank6 commented 4 years ago

The Discord creds are self explanatory. You just need thr information from the developer page on Discord. For MongoDB, if you're self hosting, use mongodb://localhost:PORT/DATABASE_NAME. If you're using an external one, like Atlas, it gives you the connection string to put in your config file.

terriblecoder1 commented 4 years ago

The Discord creds are self explanatory. You just need thr information from the developer page on Discord. For MongoDB, if you're self hosting, use mongodb://localhost:PORT/DATABASE_NAME. If you're using an external one, like Atlas, it gives you the connection string to put in your config file.

I already connected to the database of mongodb now I can't access my site, the config file is already done.

Sank6 commented 4 years ago

Try localhost

terriblecoder1 commented 4 years ago

I did just now, the site itself isn't showing up at all. is there a way to deploy this thing? I followed all the steps in the wiki help, I connected to the mongodb database too and when I viewed the site it just shows me my files... something has to be wrong.

Sank6 commented 4 years ago

If it's showing you your files, then you're not actually running it. To "deploy" it, run npm start

terriblecoder1 commented 4 years ago

I did npm start https://gyazo.com/83564c17c3b7dd303c5eac043a40593a this is what it shows. it says connected to the database and it shows my mongodb url which I did not show in the screenshot due to privacy reasons.

Sank6 commented 4 years ago

Then it's running on port 80.

terriblecoder1 commented 4 years ago

so what am I supposed to do now?

Sank6 commented 4 years ago

It should be accesible on localhost

terriblecoder1 commented 4 years ago

I tried still not working

Zaid-maker commented 4 years ago

Guys this is not an issue with code or the bott list this error occurs because u didn't validate your ip address in mongodb cluster that's why it refuse to connect.

Sank6 commented 4 years ago

It's something related to your setup but if it says it's running on port 80, it should be working. I guess you can try changing the port but I don't know what else could cause this issue.

Zaid-maker commented 4 years ago

The most common port for mongo is 2271 I think

Zaid-maker commented 4 years ago

instead of using localhost thing use connection string through mongodb compass

Sank6 commented 4 years ago

I think his issue is with accessing the site, not the mongodb connection

Zaid-maker commented 4 years ago

yeah maybe

terriblecoder1 commented 4 years ago

Yeah it is with accessing the site, the mongodb is connected. I followed all the steps and it still doesn't let me access the site :(

terriblecoder1 commented 4 years ago

Already found a new project that works, I am just going to close this. thank you guys.