问题
I have created a node app with local persistent storage in a .json file. It works fine running locally, but when I deploy it to heroku the persistent storage is modified, but then erased.
回答1:
Heroku does not provide any sort of persistent storage on dynos. If you need to persist files across sessions, you must use object storage such as Amazon S3.
https://devcenter.heroku.com/articles/dynos#ephemeral-filesystem
来源:https://stackoverflow.com/questions/42775418/heroku-local-persistent-storage