koa-serve-list
v1.0.1
Published
Serve directory listings for koa
Downloads
1,011
Readme
koa-serve-list
Serves pages that contain directory listings for a given path for koa.
serve-index wrapper for koa's middleware.
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);