I want to render raw .html pages using Express 3 as follows:
.html
server.get(\'/\', function(req, res) { res.render(\'login.html\'); }
You can send file using res.sendFile(). You can keep all html files in views folder and can set path to it in options variable.
app.get('/', (req, res)=>{ var options = { root: __dirname + '/../views/' }; var fileName = 'index.html'; res.sendFile(fileName, options); });