I'm running a program that validates a .html file (index.html) and then runs the program on a web-browser. (localhost:port/index.html).
My program understands that I'm asking for the right file but I can't execute the .html file in web-browser (just trying to display the date).
I've been looking online for references but maybe I'm not looking in the right direction or I'm just overlooking something.
Also the response.end doesn't print onto the web-browser even though other functions with response.end it works perfectly.
function doHTML(http_request, response)
{
// Read the requested file content from file system
fs.readFile('MYHTML/' + http_request, function (err, data) {
console.log('Hey youre in the HTML function');
response.end('Hey you got it working');
});
}
Aucun commentaire:
Enregistrer un commentaire