koa-favicon
favicon bounce middleware for koa
Last updated 5 years ago by coderhaoxin .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ npm 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 (5 years ago)
  • 2.0.0                                ...           next (9 years ago)

8 Versions

  • 2.1.0                                ...           5 years ago
  • 2.0.1                                ...           7 years ago
  • 2.0.0                                ...           9 years ago
  • 1.2.1                                ...           9 years ago
  • 1.2.0                                ...           10 years ago
  • 1.1.0                                ...           11 years ago
  • 1.0.1                                ...           11 years ago
  • 1.0.0                                ...           11 years ago
Downloads
Total 2
Today 0
This Week 0
This Month 1
Last Day 0
Last Week 0
Last Month 0
Dependencies (1)
  • mz ^2.7.0
Dev Dependencies (4)
Dependents (1)

© 2010 - cnpmjs.org x YWFE | Home | YWFE