Skip to content

Commit

Permalink
Update Readme.md
Browse files Browse the repository at this point in the history
Mention options object is the second param
  • Loading branch information
cesarandreu authored and jonathanong committed Dec 21, 2014
1 parent 40c3192 commit e47bdbc
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,18 @@
$ npm install koa-static
```

## Options
## API

```js
var koa = require('koa');
var app = koa();
app.use(require('koa-static')(root, opts));
```

* `root` root directory string. nothing above this root directory can be served
* `opts` options object.

### Options

- `maxage` Browser cache max-age in milliseconds. defaults to 0
- `hidden` Allow transfer of hidden files. defaults to false
Expand Down

0 comments on commit e47bdbc

Please sign in to comment.