Thanks
the create file TXT code is:
Code:
const path = require ('path');
const base = path.dirname (process.mainModule.filename);
const fs = require ('fs');
const fileText = "Prima riga \ nLa seconda riga";
fs.writeFileSync (base + '/test.txt', fileText);