ETag support for Koa responses
JavaScript
Clone or download
Permalink
Failed to load latest commit information.
test fix tests Feb 27, 2017
.eslintrc Use eslint-config-koa (#50) Mar 2, 2018
.gitignore lint++ Feb 27, 2016
.travis.yml travis: test node@7 Feb 27, 2017
History.md 3.0.0 Feb 27, 2016
Readme.md update readme Feb 27, 2017
index.js refactor: better function names Feb 27, 2016
package.json Use eslint-config-koa (#50) Mar 2, 2018

Readme.md

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

const conditional = require('koa-conditional-get');
const etag = require('koa-etag');
const Koa = require('koa');
const app = new 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