2.0.0 • Published 7 years ago

byted-koa-favicon v2.0.0

Weekly downloads
3
License
MIT
Repository
github
Last release
7 years ago

koa-favicon Build Status

Koa middleware for serving a favicon. Based on serve-favicon.

Installation

$ npm install koa-favicon

Example

const Koa = require('koa');
const favicon = require('koa-favicon');
const app = new Koa();

app.use(favicon(__dirname + '/public/favicon.ico'));

API

favicon(path, options)

Returns a middleware serving the favicon found on the given path.

options

  • maxAge cache-control max-age directive in ms, defaulting to 1 day.

License

MIT

2.0.0

7 years ago