Answers for "How to open files on a system with nodejs"

0

nodejs open file

fs = require('fs')
fs.readFile('/etc/hosts', 'utf8', function (err,data) {
  if (err) {
    return console.log(err);
  }
  console.log(data);
});
Posted by: Guest on December-05-2020

Code answers related to "How to open files on a system with nodejs"

Code answers related to "Javascript"

Browse Popular Code Answers by Language