how to send file data from express to html code example
Example 1: express send html file
app.get('/test', function(req, res) {
res.sendFile('test.html', {root: __dirname })
});
Example 2: how to send html file with express
res.sendFile(path.join(__dirname + '/index.html'));