更新文件结构,统一文档格式
This commit is contained in:
@@ -31,7 +31,7 @@ app.use(helmet());
|
||||
app.use(cors({
|
||||
origin: process.env.NODE_ENV === 'production'
|
||||
? ['https://your-domain.com']
|
||||
: ['http://localhost:9000', 'http://localhost:3000', 'http://localhost:3100', 'http://localhost:3150'],
|
||||
: ['https://www.jiebanke.com', 'https://admin.jiebanke.com', 'https://api.jiebanke.com'],
|
||||
credentials: true
|
||||
}));
|
||||
|
||||
@@ -79,7 +79,7 @@ app.use('/uploads', express.static('uploads'));
|
||||
// Swagger文档路由
|
||||
if (process.env.NODE_ENV === 'development' || process.env.ENABLE_SWAGGER === 'true') {
|
||||
app.use('/api-docs', swaggerUi.serve, swaggerUi.setup(swaggerSpec));
|
||||
console.log('📚 Swagger文档已启用: http://localhost:3100/api-docs');
|
||||
console.log('📚 Swagger文档已启用: https://api.jiebanke.com/api-docs');
|
||||
}
|
||||
|
||||
// 健康检查路由
|
||||
|
||||
Reference in New Issue
Block a user