javascript - How to append to a file in Node?

preview_player
Показать описание
#short
#javascript
#fs
#appendfile
I am trying to append a string to a log file. However writeFile will erase the content each time before writing the string.
if (err) throw err;

Any idea how to do this the easy way?
Рекомендации по теме