koa-static-middleware
Version:
Lightweight static files middleware for Koa2
31 lines (18 loc) • 476 B
Markdown
# Koa Static Middleware


Lightweight static files middleware for Koa2
## Install
```shell
npm install -S koa-static-middleware
```
## Usage
```js
const Koa = require('koa');
const path = require('path');
const staticMiddleware = require('./libs/koa-static-middleware');
const app = new Koa();
app.use(staticMiddleware(path.join(__dirname, 'public')));
```
## LICENSE
MIT