html js node Create a function that reads from a file and re
html js node
Create a function that reads from a file and returns a string with the contents of that file. Create a Node server that serves the above HTML document in its response. Have it viewable at localhost:8000/.Solution
var fs = require(\'fs\');
fs.readFile(\'DATA\', \'utf8\', function(err, contents) {
var data = contents;
});
