Skip to content

Serve directory listings for koa, based on Express's serve-index.

License

Notifications You must be signed in to change notification settings

koa-modules/serve-list

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

koa-serve-list

Serves pages that contain directory listings for a given path for koa.
serve-index wrapper for koa's middleware.

NPM version NPM Downloads Build status Test coverage Dependency status License

Install

$ npm install --save koa-serve-list

Usage

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

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

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

app.listen(3000);

<1.x

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

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

app.listen(3000);

About

Serve directory listings for koa, based on Express's serve-index.

Resources

License

Stars

Watchers

Forks

Packages

No packages published