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.
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