# koa-session2-mongo

> koa-session2-mongo

Latest version **0.0.1** (published 2017-04-18) · ISC license · 0 weekly downloads

## Install

```sh
npm install koa-session2-mongo
pnpm add koa-session2-mongo
yarn add koa-session2-mongo
bun add koa-session2-mongo
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.1 |
| Published | 2017-04-18 |
| First published | 2017-04-18 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | J |
| Maintainers | jiulongzhang |

## Links

- npm: https://www.npmjs.com/package/koa-session2-mongo
- Repository: https://github.com/jiulongzhang/koa-session2-mongo
- Homepage: https://github.com/jiulongzhang/koa-session2-mongo#readme
- Issues: https://github.com/jiulongzhang/koa-session2-mongo/issues
- npm.io page: https://npm.io/package/koa-session2-mongo

## Recent versions

- 0.0.1 (latest) — 2017-04-18

## README

# koa-session2-mongo
mongodb store for koa-session2 

**only for mongodb native driver 2.x,  driver >3.x move to https://github.com/jiulongzhang/koa-session2-mongostore**

## Require

node v7.x +

## Install
```
npm install koa-session2-mongo

```

## Usage
```js
const Koa = require("koa");
const session = require("koa-session2");
const MongoStore = require("koa-session2-mongo");
const app = new Koa();
app.use(session({     
    store: new MongoStore({
        url:  DB_URL  // your mongodb url  required
    })
}));

```

## Options
- `url`:  required, db url   
- `collection`: optional, db session collection name,default  "__session"
- `maxAge`: optional, expire time, default 10 \* 24 \* 3600 seconds

---
_Source: https://npm.io/package/koa-session2-mongo · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
