Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/eronana/koa-session-object

use object as session for koa
https://github.com/eronana/koa-session-object

Last synced: 6 days ago
JSON representation

use object as session for koa

Awesome Lists containing this project

README

        

# koa-session-object
use object as session for koa

## Usage

```javascript
const session = require('koa-session-object');
const config = {
key: 'koa:sess', /** (string) cookie key (default is koa:sess) */
maxAge: 86400000, /** (number) maxAge in ms (default is 1 days) */
overwrite: true, /** (boolean) can overwrite or not (default true) */
httpOnly: true, /** (boolean) httpOnly or not (default true) */
signed: true, /** (boolean) signed or not (default true) */
};
app.use(session(config));
```