Skip to content

elmarini/partial-response

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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

About

An Express.js middleware to byte serve content

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%