koa-favicon

favicon bounce middleware for koa

koa-favicon

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

$ npm install koa-favicon
var koa = require('koa');
var favicon = require('koa-favicon');
var app = koa();
 
app.use(favicon(__dirname + '/public/favicon.ico'));

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

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

MIT