Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

nodejs open file

fs = require('fs')
fs.readFile('/etc/hosts', 'utf8', function (err,data) {
  if (err) {
    return console.log(err);
  }
  console.log(data);
});
Source by nodejs.org #
 
PREVIOUS NEXT
Tagged: #nodejs #open #file
ADD COMMENT
Topic
Name
1+2 =