Answers for "node read file as File object"

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