Files
protoc-frontend/build.sh
2026-03-25 12:16:57 +03:00

20 lines
454 B
Bash
Executable File

#!/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]"