I\'m trying to find out how to load and render a basic HTML file so I don\'t have to write code like:
response.write(\'...blahblahblah
...\
This is an update to Muhammed Neswine's answer
In Express 4.x, sendfile has been deprecated and sendFile function has to be used. The difference is sendfile takes relative path and sendFile takes absolute path. So, __dirname is used to avoid hardcoding the path.
var express = require('express');
var app = express();
var path = require("path");
app.get('/', function (req, res) {
res.sendFile(path.join(__dirname + '/folder_name/filename.html'));
});