Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/eronana/koa-session-object
- Owner: Eronana
- Created: 2017-05-27T04:00:08.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2017-08-08T03:35:36.000Z (about 7 years ago)
- Last Synced: 2024-10-20T14:28:37.790Z (18 days ago)
- Language: JavaScript
- Size: 2.93 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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));
```