A tiny Go + templ + HTMX site for checking the latest Stellar ledger tip on mainnet and testnet.
With Nix:
nix develop
export OBSRVR_API_KEY="your-api-key"
templ generate
go run ./cmd/latestledgerWithout Nix:
export OBSRVR_API_KEY="your-api-key"
go run github.com/a-h/templ/cmd/templ generate
go run ./cmd/latestledgerOpen http://localhost:8080.
OBSRVR_API_KEY— Obsrvr Gateway API key. Sent server-side asAuthorization: Api-Key ....PORT— optional HTTP port, defaults to8080.
Set OBSRVR_API_KEY as an encrypted environment variable.
Example build command:
CGO_ENABLED=0 go run github.com/a-h/templ/cmd/templ generate && CGO_ENABLED=0 go build -o latestledger ./cmd/latestledgerExample run command:
./latestledger