Warm tip: This article is reproduced from serverfault.com, please click

If I use Heroku to host my d.py bot, can it write and save to my database in mongodb?

发布于 2020-11-30 04:54:04

I have been using heroku to host my bot and it would normally store data in .json files, however it does not write and store to them as github also isn't a database site, is it possible to host my discord bot from heroku and it still edits my database within Mongodb and retrieves so no data is lost?

Questioner
Cohen
Viewed
0
Burning Alcohol 2020-11-30 13:59:40

Yes. Since you can send external requests to outside connections from Heroku, you can easily communicate with MongoDB Atlas using Heroku to host your app.

Reference: How to use Atlas on Heroku