Answers for "how to render a new page in node js through express"

0

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/
    })
})
Posted by: Guest on October-08-2021

Code answers related to "how to render a new page in node js through express"

Code answers related to "Javascript"

Browse Popular Code Answers by Language