diff options
| author | bndw <ben@bdw.to> | 2026-02-13 20:50:27 -0800 |
|---|---|---|
| committer | bndw <ben@bdw.to> | 2026-02-13 20:50:27 -0800 |
| commit | 97e6c9a0c2c32bf514d3a4218d239741f1dc26c8 (patch) | |
| tree | 259cc3a149c9521adb9d212d0f4e5261a1ed08c6 /cmd/relay/main.go | |
| parent | dfa19ff0776be0850ad7b86ca579601431349593 (diff) | |
feat: add HTML index page for browser viewing
Add a beautiful HTML landing page when visiting relay in browser:
- Shows all three protocol endpoints (gRPC, Connect, WebSocket)
- Lists supported NIPs (01, 09, 11)
- Displays relay features and info
- Responsive design with gradient styling
- Serves on GET requests (regular Accept header)
- NIP-11 still served for Accept: application/nostr+json
Diffstat (limited to 'cmd/relay/main.go')
| -rw-r--r-- | cmd/relay/main.go | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/cmd/relay/main.go b/cmd/relay/main.go index 9cf6ad6..56668fc 100644 --- a/cmd/relay/main.go +++ b/cmd/relay/main.go | |||
| @@ -51,6 +51,7 @@ func main() { | |||
| 51 | mux.Handle(path, handler) | 51 | mux.Handle(path, handler) |
| 52 | 52 | ||
| 53 | wsHandler := wshandler.NewHandler(store, subManager) | 53 | wsHandler := wshandler.NewHandler(store, subManager) |
| 54 | wsHandler.SetIndexData(*grpcAddr, *wsAddr, *wsAddr) | ||
| 54 | mux.Handle("/", wsHandler) | 55 | mux.Handle("/", wsHandler) |
| 55 | 56 | ||
| 56 | grpcLis, err := net.Listen("tcp", *grpcAddr) | 57 | grpcLis, err := net.Listen("tcp", *grpcAddr) |
