nodejs读文件

//读文件
var fs=require("fs");
fs.readFile("index.html","utf-8",function(err,data){
console.log(data);
});
原文地址:https://www.cnblogs.com/shenyulin/p/4445782.html