Reading, writing and storing JSON with Node on Heroku
问题 I am building an App based on Node.js running on Heroku. The app uses a JSON file which at the moment is being pushed with the rest of the app, and we are reading and writing to it like so: var channelsList = require("./JSON/channels.json"); ... fs.writeFile("JSON/channels.json", JSON.stringify(channelsList), onCleaned); This has worked for now for the prototype, but I know that we need to use a data store or the changes won't persist when Dyno's sleep or I push changes. I have read that