npm

npm’s 2019 JavaScript ecosystem survey analysis is now available! Get your copy here »

koa-etag

3.0.0 • Public • Published

koa-etag

NPM version Build status Test coverage Dependency Status License Downloads

ETag support for Koa responses using etag.

Installation

$ npm install koa-etag

Example

var conditional = require('koa-conditional-get');
var etag = require('koa-etag');
var koa = require('koa');
var app = koa();
 
// etag works together with conditional-get
app.use(conditional());
app.use(etag());
 
app.use(function(ctx) {
  ctx.body = 'Hello World';
});
 
app.listen(3000);
 
console.log('listening on port 3000');

License

MIT

install

npm i koa-etag

Downloadsweekly downloads

15,488

version

3.0.0

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
Report a vulnerability