@skweb/plugin-redis
v1.0.0
Published
Redis client plugin for @skweb/framework
Readme
@skweb/plugin-redis
Redis client plugin for @skweb/framework. Injects a RedisClient instance
into the framework via ctx.framework.setRedis() during the beforeSetup phase.
Installation
npm install @skweb/plugin-redis @skweb/framework @skweb/redisUsage
import { WebFramework } from '@skweb/framework'
import { RedisPlugin } from '@skweb/plugin-redis'
import { SequelizePlugin } from '@skweb/plugin-sequelize'
import { createExpressApp } from '@skweb/express'
const framework = new WebFramework({
runtimeFactory: createExpressApp
})
framework.usePlugin(new SequelizePlugin({ /* db config */ }))
framework.usePlugin(new RedisPlugin({
host: '127.0.0.1',
port: 6379,
password: undefined
}))
// framework.setup() will now create Redis connectionLicense
MIT
