Answers for "node reading file"

12

read file node

// load fs
const fs = require("fs");
// read the file
const content = fs.readFileSync("./my_file.txt");
// print it
console.log(content.toString());
Posted by: Guest on October-11-2020

Code answers related to "Javascript"

Browse Popular Code Answers by Language