Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

node load string from file

var fs = require('fs');

fs.readFile('my-file.txt', 'utf8', function(err, data) {
    if (err) throw err;
    console.log(data);
});
Source by stackabuse.com #
 
PREVIOUS NEXT
Tagged: #node #load #string #file
ADD COMMENT
Topic
Name
1+6 =