/** * @file 应用配置文件 * @author Yk * @createdAt 2025-07-01 * @lastModifiedAt 2025-07-01 * @description 包含服务器、SSE和限流配置 */ module.exports = { server: { port: process.env.PORT || 3080, env: process.env.NODE_ENV || 'development' }, sse: { heartbeatInterval: 15000, // 15秒 allowedOrigins: process.env.ALLOWED_ORIGINS?.split(',') || ['http://localhost:3001'] }, rateLimit: { windowMs: 15 * 60 * 1000, // 15分钟 max: 100 // 每个IP限制100个请求 } };