Skip to content

Latest commit

 

History

History
52 lines (40 loc) · 1.59 KB

README.md

File metadata and controls

52 lines (40 loc) · 1.59 KB

koa-serve-static

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

NPM version NPM Downloads Build status Test coverage Dependency status License

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));