koa-favicon
favicon bounce middleware for koa
Last updated 4 months ago by coderhaoxin .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install koa-favicon 
SYNC missed versions from official npm registry.

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.
  • mime specify the mime-type of the favicon, defaults to "image/x-icon"

License

MIT

Current Tags

  • 2.1.0                                ...           latest (4 months ago)
  • 2.0.0                                ...           next (4 years ago)

8 Versions

  • 2.1.0                                ...           4 months ago
  • 2.0.1                                ...           2 years ago
  • 2.0.0                                ...           4 years ago
  • 1.2.1                                ...           4 years ago
  • 1.2.0                                ...           6 years ago
  • 1.1.0                                ...           6 years ago
  • 1.0.1                                ...           7 years ago
  • 1.0.0                                ...           7 years ago
Downloads
Today 8
This Week 1,718
This Month 4,668
Last Day 68
Last Week 4,755
Last Month 6,613
Dependencies (1)
  • mz ^2.7.0
Dev Dependencies (4)
Dependents (207)

Copyright 2014 - 2016 © taobao.org |