Search
 
SCRIPT & CODE EXAMPLE
 

HTML

send html file express

res.sendFile(path.join(__dirname + '/index.html'));
Comment

express return html file

//res.sendFile(path [, options] [, fn])
app.get('/test', function(req, res) {
    res.sendFile('test.html')
});
Comment

express send html file

app.get('/test', function(req, res) {
    res.sendFile('test.html', {root: __dirname })
});
Comment

express send html from string

// Express.JS: Send HTML from string
res.send(`
  <h1>Welcome</h1>
  <h2>Scroll to learn more</h2>
`);
Comment

PREVIOUS NEXT
Code Example
Html :: how to add datepicker in bootstrap(html form) 
Html :: std map count vs find 
Html :: how to summon an entity with a tag 
Html :: aos library 
Html :: html format date 
Html :: html auto start video 
Html :: how to make list in html 
Html :: non editable text field 
Html :: img src data base64 
Html :: js input change form submit 
Html :: css force string to wrap 
Html :: display html input datetime-local 
Html :: how to strike out text in html 
Html :: use v-model in custom component 
Html :: html multiply 
Html :: how to add jquery to shopify 
Html :: how to add a favicon to html 
Html :: redirect page via html 
Html :: change body font 
Html :: hide top bar menu item odoo 
Html :: fixed size body html 
Html :: html tab character tag 
Html :: embed meta tag nextjs 
Html :: Get Session content on cshtml 
Html :: bootstrap news template 
Html :: html table span 2 rows 
Html :: definition list in html 
Html :: show scrollbar only when scrolling 
Html :: how to add active class to current element javascript 
Html :: HTML Image Maps 
ADD CONTENT
Topic
Content
Source link
Name
5+4 =