Skip to content

wssgcg1213/koa-static-plus

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

88 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

koa-static-plus

NPM version Build status License Downloads

Koa static file serving middleware, a modify of koa-static

Installation

$ npm install koa-static-plus

API

TOTALLY compatible to koa-static

Additional Options

  • pathPrefix (string), Static path prefix string.

Example

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

Author

@Ling.(wssgcg1213)

Liscense

MIT

About

An extended middleware of koa-static(v2.0.0) for koa

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published