1.0.0 • Published 8 years ago

koa-serve-static v1.0.0

Weekly downloads
291
License
MIT
Repository
github
Last release
8 years ago

koa-serve-static

Serve static files for koa.
serve-static wrapper for koa's middleware.

NPM version Build status Test coverage License Dependency status

Install

$ npm install --save koa-serve-static

Usage

=1.x 100%, working with koa-v2

const koa = require('koa');
const serveStatic = require('koa-serve-static');
const app = new Koa();

app.use(serveStatic(root, options));

<1.x

var koa = require('koa');
var serveStatic = require('koa-serve-static');
var app = koa();

app.use(serveStatic(root, options));