node package manager

Introducing npm Enterprise add-ons. Integrate third-party dev tools into npm…

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