Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

how to render a new page in node js through express

app.get('/renderHTML', (req, res) => {
    res.sendFile('FileName.html', {
        root: path.join(__dirname, './') // <= you might have to write '/foldername/
    })
})
 
PREVIOUS NEXT
Tagged: #render #page #node #js #express
ADD COMMENT
Topic
Name
4+7 =