数据库插件

This commit is contained in:
robin
2022-05-31 08:34:53 +08:00
parent c764e7097d
commit 3494cecb9d
9 changed files with 171 additions and 9 deletions
+14
View File
@@ -0,0 +1,14 @@
/**
* redis
*
* 参考文档:
* https://github.com/luin/ioredis
* https://luin.github.io/ioredis/classes/Redis.html
*/
const config = require("./config")
const Redis = require("ioredis");
module.exports = async (app) => {
const redis = new Redis(config);
app.redis = redis
}