@rill/fresh
v1.0.1
Published
HTTP response freshness testing middleware for Rill.
Downloads
10
Maintainers
Readme
Installation
npm install @rill/fresh
Example
var fresh = require('@rill/fresh')
var etag = require('@rill/etag')
var rill = require('rill')
var app = rill()
// use it upstream from etag so
// that they are present
app.use(fresh())
// add etags
app.use(etag())
// respond
app.use(function ({ res }, next){
res.body = {
name: 'tobi',
species: 'ferret',
age: 2
}
})
Contributions
- Use
npm test
to run tests.
Please feel free to create a PR!