Skip to content
/ favicon Public
forked from koajs/favicon

Koa middleware for serving a favicon

Notifications You must be signed in to change notification settings

koa2/favicon

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Koa middleware for serving a favicon

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%