Feat: Install Redis & Test API

安装 Redis,测试编写必应和状态 API(昨晚应该提交的
This commit is contained in:
2022-04-10 14:15:40 +08:00
parent 30062e5d99
commit c2999ea5e7
5 changed files with 172 additions and 1 deletions
+13
View File
@@ -0,0 +1,13 @@
import { createClient, RedisClientType } from 'redis';
export let client: RedisClientType;
(async () => {
client = createClient({
url: 'redis://127.0.0.1:6379'
});
client.on('error', (err) => console.log('Redis Client Error', err));
await client.connect();
})();