# koa-grace-session

> koa-grace session服务中间件

Latest version **1.0.0** (published 2016-10-03) · MIT license · 0 weekly downloads

## Install

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

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2016-10-03 |
| First published | 2016-10-03 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | xiongwilee |
| Maintainers | xiongwilee |
| Keywords | koa-grace, session |

## Links

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

## Dependencies (2)

- [koa-redis](https://npm.io/package/koa-redis.md) ^2.1.2
- [koa-generic-session](https://npm.io/package/koa-generic-session.md) ^1.11.3

## Alternatives

- [@clerk/clerk-expo](https://npm.io/package/@clerk/clerk-expo.md) — 133.6K weekly downloads
- [@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

## Recent versions

- 1.0.0 (latest) — 2016-10-03

## README

## koa-grace-session

koa-grace session中间件

### Install

    $ npm install koa-grace-session --save

### Usage

```
session(app, options)
```
- app: {Object} koa instance.
- options: {Object}
  - redis: {Object} redis配置项，例如：
    
        { 
          host: '127.0.0.1',
          port: 6379,
          password: 'password' 
      }
  - 其他配置项参考：[generic-session配置](https://github.com/koajs/generic-session) 及 [koa-redis配置](https://github.com/koajs/koa-redis)

**app.js**

```
'use strict';

var koa = require('koa');
var router = require('koa-grace-router');
var session = require('..');

var app = koa();

// 配置api
app.use(session(app));

app.use(router(app, {
  root: './example/controller',
  domain: '127.0.0.1'
}));

app.listen(3000, function() {
  console.log('Listening on 3000!');
});
```

### Test

    npm test

### License

MIT

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