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;

});

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 docum

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site