partial-response

1.0.0 • Public • Published

partial-response

An Express.js middleware to byte serve content

Install

npm install --save partial-response

Usage

partial-response inserts a method (sendPartial) on the response object.

It takes a file path as parameter, and will serve the file with proper Range headers.

Like so:

const pr = require('partial-response')

app.get('/cat-pic', pr, (req, res) => {
  res.sendPartial('./cat-pic1.jpg')
})

License

MIT

Readme

Keywords

none

Package Sidebar

Install

npm i partial-response

Weekly Downloads

1

Version

1.0.0

License

MIT

Last publish

Collaborators

  • elmarini
  • lng
  • poyu