Egg.js 使用 redis
https://github.com/eggjs/egg-redis
1.安装 redis
npm i egg-redis --save
2.找到${app_root}/config/plugin.js 配置开启插件
exports.redis = {
enable: true, package: 'egg-redis'
};
3.找到 config.default.js 配置 redis 数据库连接地址
config.redis = {
client: {
port: 6379,
host: '127.0.0.1'