Answers for "express send html append"

9

how to send html file with express

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

express send html from string

// Express.JS: Send HTML from string
res.send(`
  <h1>Welcome</h1>
  <h2>Scroll to learn more</h2>
`);
Posted by: Guest on March-30-2022

Browse Popular Code Answers by Language