first commit

This commit is contained in:
fabio
2026-02-18 21:10:23 +01:00
commit dec68aff39
91 changed files with 823 additions and 0 deletions

37
README.md Normal file
View File

@@ -0,0 +1,37 @@
# 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
```