express js return image to response payload code example
Example: nodejs express return image
var filepath = '~/path/to/file.png'
app.get('/path/for/site', function (req, res) {
res.sendFile(filepath);
})
var filepath = '~/path/to/file.png'
app.get('/path/for/site', function (req, res) {
res.sendFile(filepath);
})