I\'ve been trying to find a way to write to a file when using Node.js, but with no success. How can I do that?
You can write to files with streams.
Just do it like this:
const fs = require('fs'); const stream = fs.createWriteStream('./test.txt'); stream.write("Example text");