0.0.1 • Published 5 years ago

@zcorky/koa-static v0.0.1

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

koa-static

NPM version Coverage Status Dependencies Build Status license issues

Simple OnError for Koa

Install

$ npm install @zcorky/koa-static

Usage

// See more in test
import staticCache from '@zcorky/koa-static';

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

// fallback
app.use(staticCache('/static', {
  dir: path.join(__dirname, './public'),
}));

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

Related