0.0.1 • Published 5 years ago

@koex/favicon v0.0.1

Weekly downloads
-
License
MIT
Repository
github
Last release
5 years ago

favicon

NPM version Coverage Status Dependencies Build Status license issues

favicon for koa extend.

Install

$ npm install @koex/favicon

Usage

// See more in test
import { join } from 'path';
import favicon from '@koex/favicon';

import * as Koa from 'koa';
const app = new Koa();

app.use(favicon({
  path: join(__dirname, 'assets', 'favicon.ico'),
}));

app.use(ctx => {
  ctx.body = 'Hello, Koex!';
});

app.listen(8000, '0.0.0.0', () => {
  console.log('koa server start at port: 8000');
});

Related