nodejsHow to write file
const fs = require('fs');
fs.writeFile('/tmp/test.txt', 'hi!', (err, data) => {
  console.log(err);
});ctrl + c| require('fs')library to work with file system | /tmp/test.txtpath of file to write | 
| 'hi!'Data to write to file | console.log(err)if  | 
| fs.writeFile(writes given data to specified file | |
Usage example
const fs = require('fs');
fs.writeFile('/tmp/test.txt', 'hi!', (err, data) => {
  console.log(err);
});output
null