Node.js fs writeFile()

Description

Node.js fs writeFile()

var fs = require("fs");
console.log("Starting...");
fs.writeFile("./hello.html", 
  "<html><body><h1>Hello!</h1></body></html>",
  function (error) {
  console.log("file has written.");
  }//from  ww w. j  a  v  a 2 s.c  om
);
console.log("Done.");



PreviousNext

Related