Saving a json file on Heroku

╄→гoц情女王★ 提交于 2021-01-29 11:44:55

问题


I have a simple sinatra app on Heroku which fetches some json data and is then fetched again and rewritten every 10 minutes, what would be the easiest way to save the json data?

Should I use S3 or mongodb or is there a simpler option?


回答1:


I think writing into a database (mongodb or other) would be your best bet. It's simplest to set up on Heroku.




回答2:


I think the easiest route is to save your json using Heroku's free 5mb memcached plugin (use the dalli gem),

This link describes setting up a sinatra app with memcache

Again, I think that is going to be your least complicated approach.



来源:https://stackoverflow.com/questions/11316830/saving-a-json-file-on-heroku

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!