сборка сервера фронта в бинарник
This commit is contained in:
19
build.sh
Executable file
19
build.sh
Executable file
@@ -0,0 +1,19 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
echo "=== Building frontend ==="
|
||||
npm run build
|
||||
|
||||
echo "=== Copying dist to server/ ==="
|
||||
rm -rf server/dist
|
||||
cp -r dist server/dist
|
||||
|
||||
echo "=== Building Go binary ==="
|
||||
cd server
|
||||
go mod init protoc-frontend-server 2>/dev/null || true
|
||||
GOOS=windows GOARCH=amd64 go build -o ../protoc-frontend.exe .
|
||||
|
||||
echo ""
|
||||
echo "=== Done! ==="
|
||||
echo "Binary: protoc-frontend.exe"
|
||||
echo "Usage: protoc-frontend.exe [-port 1111] [-api http://localhost:8000]"
|
||||
Reference in New Issue
Block a user