nodejs express return image

JavaScript
var filepath = '~/path/to/file.png'

app.get('/path/for/site', function (req, res) {
    res.sendFile(filepath);
})
Source

Also in JavaScript: