Answers for "nodejs express return image"

3

nodejs express return image

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

app.get('/path/for/site', function (req, res) {
    res.sendFile(filepath);
})
Posted by: Guest on December-26-2019

Code answers related to "Javascript"

Browse Popular Code Answers by Language