akyuu-adapter-redis

0.1.1 • Public • Published

akyuu-adapter-redis

redis adapter for akyuu

Installation

npm install akyuu-adapter-redis

Configuration

Make sure you have a connections section in your configuration file(s).
And its adapter should be redis.

option required remark
adapter must be redis
host redis host
port redis port
password redis password
db redis db number

Usage

Config File

// ${project}/config/default/connections.js

'use strict'

module.exports = {
    myRedisAdapter: {
        adapter: 'redis',
        host: '127.0.0.1',
        port: '6379',
        password: null,
        db: null
    }
}

Model File

// ${project}/models/${model}.js

'use strict'

const akyuu = require('akyuu');
const redisClient = akyuu.config.connection.get('myRedisAdapter');

module.exports = redisClient;

/akyuu-adapter-redis/

    Package Sidebar

    Install

    npm i akyuu-adapter-redis

    Weekly Downloads

    1

    Version

    0.1.1

    License

    MIT

    Last publish

    Collaborators

    • duanpengfei