max li
max li

Reputation: 2457

Appending files in node.js on heroku

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

Answers (1)

Andreas Hultgren
Andreas Hultgren

Reputation: 14953

You cannot modify files in heroku. Use a database instead.

Upvotes: 2

Related Questions