Answers for "send html code in express"

1

express send raw html

res.set('Content-Type', 'text/html');
res.send(new Buffer('<h2>Test String</h2>'));
Posted by: Guest on October-14-2020
7

send html file express

res.sendFile(path.join(__dirname + '/index.html'));
Posted by: Guest on March-05-2020

Browse Popular Code Answers by Language