temp
This commit is contained in:
@@ -3,7 +3,6 @@ import { useConfig } from '@kevisual/use-config';
|
||||
import { useContextKey } from "@kevisual/context";
|
||||
|
||||
export const config = useConfig()
|
||||
|
||||
// 首先从 process.env 读取环境变量
|
||||
const redisConfig = {
|
||||
host: process.env.REDIS_HOST || 'kevisual.cn',
|
||||
@@ -27,14 +26,14 @@ export const createRedisClient = (options = {}) => {
|
||||
});
|
||||
// 监听连接事件
|
||||
redis.on('connect', () => {
|
||||
console.log('Redis 连接成功');
|
||||
// console.log('Redis 连接成功');
|
||||
});
|
||||
|
||||
redis.on('error', (err) => {
|
||||
console.error('Redis 连接错误', err);
|
||||
// console.error('Redis 连接错误', err);
|
||||
});
|
||||
redis.on('ready', () => {
|
||||
console.log('Redis 已准备好处理请求');
|
||||
// console.log('Redis 已准备好处理请求');
|
||||
});
|
||||
return redis;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user