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

python-如果我使用Heroku托管d.py僵尸程序,它可以写入并保存到mongodb中的数据库中吗?

(python - 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

我一直在使用heroku来托管我的机器人,它通常会将数据存储在.json文件中,但是它不会写入和存储到它们,因为github也不是数据库站点,是否有可能从heroku托管我的不和谐的bot?它仍会在Mongodb中编辑我的数据库并进行检索,因此不会丢失任何数据?

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

是的。由于你可以从Heroku向外部连接发送外部请求,因此你可以使用Heroku托管应用程序轻松地与MongoDB Atlas通信。

参考:如何在Heroku上使用Atlas