Reputation: 2457
I tired below code in local works, but not in heroku, anyone know the reason?
var mob = req.body.phone + " \n";
fs.appendFile("phone.txt", mob, function(err){
if (err) throw err;
});
Upvotes: 1
Views: 261
Reputation: 14953
You cannot modify files in heroku. Use a database instead.
Upvotes: 2