We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6a3687a commit 00f6e10Copy full SHA for 00f6e10
2 files changed
build/server
442 KB
scripts/build.sh
@@ -33,8 +33,8 @@ rm -rf frontend/build
33
34
# --- 构建后端 ---
35
echo "🏗️ Building backend..."
36
-# 编译 Go 应用,输出到 build/server
37
-go build -o build/server main.go
+# 编译 Go 应用,输出到 build/server(为 Linux 平台编译)
+GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build -o build/server main.go
38
echo "✅ Backend built successfully."
39
40
echo "🚀 Build complete! All artifacts are in the 'build' directory."
0 commit comments