Answer the question
In order to leave comments, you need to log in
nohup. Why doesn't writing to a file with fwrite work?
Hello. Can you please tell me why writing to a file does not work when calling a file through nohup (nohup forever start /var/www/sitename/server.js)?
fs.readFile(this.filename, "utf-8", (err, data) => {
let new_content = `${data}\n${text}`;
fs.writeFile(this.filename, new_content);
});
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question