Files
bruno_server/README.md
2026-02-18 21:10:23 +01:00

38 lines
799 B
Markdown

# Server build & embed helpers
Short instructions to build and embed the SPA into the Go server binary.
- Build for host (mac/linux):
```sh
make build-embed
```
- Build Windows executable (cross-compile) from mac/linux (requires Go installed):
```sh
# run PowerShell script (requires pwsh)
make windows
# or do it manually from the repository root:
cd server
cp -R ../app/dist/spa/. server/static/
GOOS=windows GOARCH=amd64 go build -o server/server_windows.exe main.go
```
After building, run the binary (host OS):
```sh
PORT=8080 ./server/server.bin
```
- Build mac binaries (darwin amd64 + arm64):
```sh
make mac
# or manually:
cd server
GOOS=darwin GOARCH=amd64 go build -o server/server_darwin_amd64 main.go
GOOS=darwin GOARCH=arm64 go build -o server/server_darwin_arm64 main.go
```