标签:
Static file serving middleware for koa with directory, rewrite and index support
static file serving middleware for koa with directory, rewrite and index support
rootDir
{string} directory that is to be serverrootPath
{string} optional rewrite pathlog
{boolean} request access log to consolemaxage
Browser cache max-age in milliseconds. defaults to 0hidden
Allow transfer of hidden files. defaults to falsegzip
Try to serve the gzipped version of a file automatically when gzip
is supported by a client and if the requested file with .gz
extension exists. defaults to true.See examples for code examples
pkoretic
on freenodeMIT
基于 Koa平台Node.js开发的KoaHub.js的静态服务器重写和索引代码
标签:
原文地址:http://www.cnblogs.com/jycxqe/p/5923432.html