Package Exports
- koa-etag
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (koa-etag) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
koa-etag
Etag support for Koa responses using etag.
Installation
# npm
$ npm install koa-etag
# yarn
$ yarn add 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');