Hi Bucky,

Thanks for your tutorials on youtube. You demonstrated that you can add a html file on http request.

I am wondering if I can use php for this. I am using a php framework (Laravel) and the files in views are php files. Could you show me how to go about loading a php file instead of html?



function onRequest(request, response){

if(request.method == 'GET' && request.url == '/'){
response.writeHead(200, {"Content-Type": "text/html"});
fs.createReadStream("./index.html").pipe(response);
}else{
send404Response(response);
}
}


Thanks,
Ryan