feat: SSG构建|GO二进制SSG产物打包

This commit is contained in:
MatrixSeven
2025-08-02 13:36:01 +08:00
parent 0000be2a68
commit c163756d2c
32 changed files with 1938 additions and 1072 deletions

View File

@@ -1,30 +0,0 @@
import { NextRequest, NextResponse } from 'next/server';
import { getBackendUrl } from '@/lib/config';
export async function POST(request: NextRequest) {
try {
const body = await request.json();
// 使用配置管理获取后端URL
const backendUrl = getBackendUrl('/api/create-room');
// 转发请求到Go后端
const response = await fetch(backendUrl, {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify(body),
});
const data = await response.json();
return NextResponse.json(data, { status: response.status });
} catch (error) {
console.error('Error creating room:', error);
return NextResponse.json(
{ success: false, message: '创建房间失败' },
{ status: 500 }
);
}
}