favicon for koa extend.
$ npm install @koex/favicon
// 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');
});