Koa static file serving middleware, a modify of koa-static
$ npm install koa-static-plus
TOTALLY compatible to koa-static
pathPrefix
(string), Static path prefix string.
import koaStaticPlus from 'koa-static-plus'
// ... app = koa()
app.use(koaStaticPlus(path.join(__dirname, '../public'), {
pathPrefix: '/static'
})
// $ GET /static/hello.txt
// will to send the file ../public/hello.txt
@Ling.(wssgcg1213)
MIT