# koa-mysql-session

> a session store compatible with koa-generic-session based off of the SQL logic in the connect mysql-session-store project

Latest version **0.0.2** (published 2014-10-20) · ISC license · 0 weekly downloads

## Install

```sh
npm install koa-mysql-session
pnpm add koa-mysql-session
yarn add koa-mysql-session
bun add koa-mysql-session
```

## 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.2 |
| Published | 2014-10-20 |
| First published | 2014-09-21 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 21 |
| Author | todd brown |
| Maintainers | tb01923 |
| Keywords | koa, session, mysql, nodejs |

## Links

- npm: https://www.npmjs.com/package/koa-mysql-session
- Repository: https://github.com/tb01923/koa-mysql-session
- Issues: https://github.com/tb01923/koa-mysql-session/issues
- npm.io page: https://npm.io/package/koa-mysql-session

## Dependencies (2)

- [co](https://npm.io/package/co.md) ^3.1.0
- [co-mysql](https://npm.io/package/co-mysql.md) ^0.4.1

## Alternatives

- [@pothos/plugin-authz](https://npm.io/package/@pothos/plugin-authz.md) — 12.4K weekly downloads
- [@bounded-sh/client](https://npm.io/package/@bounded-sh/client.md) — 3.2K weekly downloads
- [@luigi-project/plugin-auth-oauth2](https://npm.io/package/@luigi-project/plugin-auth-oauth2.md) — 2.3K weekly downloads
- [@nocobase/plugin-verification](https://npm.io/package/@nocobase/plugin-verification.md) — 2.0K weekly downloads
- [escher-request](https://npm.io/package/escher-request.md) — 545 weekly downloads

## Recent versions

- 0.0.2 (latest) — 2014-10-20
- 0.0.1 — 2014-10-20
- 0.0.0 — 2014-09-21

## README

koa-mysql-session
=================
this is an adpatation of the logic from the connect mysql-session-store (https://github.com/sugendran/mysql-session-store) to koa-generic-session (https://github.com/koajs/generic-session).

https://www.npmjs.org/package/koa-mysql-session

Usage
=================
npm install koa-mysql-session


example
=================
```js
const koa = require('koa')
    , session = require('koa-generic-session')
    , MysqlStore = require('koa-mysql-session')
    , app = koa() ;

const THIRTY_MINTUES = 30 * 60 * 1000;

const config= {
        user: "someUser",
        password: "somePwd",
        database: "someDatabase",
        host: "someHOst"
}

app.keys = ['your-session-secret']
app.use(session({
        store: new MysqlStore(config),
        rolling: true,
        cookie: {
            maxage:THIRTY_MINTUES
        }
}))

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