implement auth, closed and close envelopes

This commit is contained in:
2025-08-30 13:21:06 +01:00
parent 1ba2bb0a9b
commit acee5e3a90
23 changed files with 1186 additions and 44 deletions

View File

@@ -5,6 +5,7 @@ import (
"fmt"
"net/http"
"lol.mleku.dev/chk"
"lol.mleku.dev/log"
"next.orly.dev/app/config"
)
@@ -20,11 +21,14 @@ func Run(ctx context.Context, cfg *config.C) (quit chan struct{}) {
}()
// start listener
l := &Server{
Ctx: ctx,
Config: cfg,
}
addr := fmt.Sprintf("%s:%d", cfg.Listen, cfg.Port)
log.I.F("starting listener on %s", addr)
go http.ListenAndServe(addr, l)
log.I.F("starting listener on http://%s", addr)
go func() {
chk.E(http.ListenAndServe(addr, l))
}()
quit = make(chan struct{})
return
}