Search
 
SCRIPT & CODE EXAMPLE
 

HTML

send html file express

res.sendFile(path.join(__dirname + '/index.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 include the copyright symbol in html 
Html :: restart remote computer cmd using ip address 
Html :: what to put in http equiv in html 
Html :: md cheat sheet 
Html :: ngxcountup suffix 
Html :: ol text align 
Html :: bootstrap radio 
Html :: HTML Table Padding & Spacing 
Html :: nuxt cursor focus 
Html :: angular.io hide 
Html :: basefont tag in html 
Html :: auto year in html 
Html :: how to embed an image in html 
Html :: country code for continents 
Html :: change color on the same string html 
Html :: input type phone number 
Html :: html video fullscreen 
Html :: how to create a search bar like google in html 
Html :: bootstrap table combine columns 
Html :: vuetify v-text-field bottom padding 
Html :: laravel blade cheched 
Html :: predefine data list in input tag html 
Html :: canonical link 
Html :: call modal by id href 
Html :: remove space table html 
Html :: new line html 
Html :: how to show little description on hover html 
Html :: tailwind css modal 
Html :: how to make text emphasized in html 
Html :: form action without redirect 
ADD CONTENT
Topic
Content
Source link
Name
6+6 =