express sendFile logic refactored as a thunk
npm install serve-fileres.sendFile. Can be used standalone with router to support HTTP/2 protocol.
npm i -S serve-file
js
import Router from 'router'
import serveFile from 'serve-file'
const app = Router()
app.use('/my-file.txt', serveFile('path/to/my-file.txt'))
``