writing in html and saving in js file using node.js code example
Example: how to right plain text format file in node js
var fs = require('fs')
fs.appendFile('log.txt', 'new data', function (err) {
if (err) {
// append failed
} else {
// done
}
})