Skip to content

koa-modules/serve-static

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Serve static files, based on Express's serve-static.

Resources

License

Stars

Watchers

Forks

Packages

No packages published