I want to display a html file when a call is triggered, therefore I tried creating a readfilestream in nodejs and adding the html file to it.
res.writeHead(200, {'Content-Type': 'text/html'});
var readStream = fs.createReadStream(__dirname + '/password.html','utf8');
readStream.pipe(res)
It works perfectly fine, but I need to add parameters to the file.
var testParameter= 'test';
I want to display the testParameter variable in my html file. Is this possible?