Neverending Package Mountain
Introducing npm Teams! Private packages + team management tools.Learn more »

koa-favicon

2.0.1 • Public • Published

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

Install

npm i koa-favicon

DownloadsWeekly Downloads

19,172

Version

2.0.1

License

MIT

Unpacked Size

2.77 kB

Total Files

4

Last publish

Collaborators

  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar