// // server/utils/redis.ts // import Redis from 'ioredis'; // const config = useRuntimeConfig(); // // 从环境变量读取 Redis 配置(需在 .env 中配置) // const redis = new Redis({ // host: 'localhost', // port: 6379, // password: '', // 如果有密码 // db: 0, // 数据库编号 // }); // export default redis;