node js send file public code example
Example 1: send html file express
res.sendFile(path.join(__dirname + '/index.html'));
Example 2: nodejs express return image
var filepath = '~/path/to/file.png'
app.get('/path/for/site', function (req, res) {
res.sendFile(filepath);
})