Skip to content

Commit 00f6e10

Browse files
committed
feat:build
1 parent 6a3687a commit 00f6e10

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

build/server

442 KB
Binary file not shown.

scripts/build.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ rm -rf frontend/build
3333

3434
# --- 构建后端 ---
3535
echo "🏗️ Building backend..."
36-
# 编译 Go 应用,输出到 build/server
37-
go build -o build/server main.go
36+
# 编译 Go 应用,输出到 build/server(为 Linux 平台编译)
37+
GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build -o build/server main.go
3838
echo "✅ Backend built successfully."
3939

4040
echo "🚀 Build complete! All artifacts are in the 'build' directory."

0 commit comments

Comments
 (0)