Feat: Install Redis & Test API
安装 Redis,测试编写必应和状态 API(昨晚应该提交的
This commit is contained in:
@@ -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();
|
||||
})();
|
||||
Reference in New Issue
Block a user