Remove unused eventpool package, improve logging levels, standardize websocket handling, and add HandleClose functionality.

This commit is contained in:
2025-09-02 23:01:13 +01:00
parent 51f04f5f60
commit 5d04afd748
8 changed files with 73 additions and 83 deletions

View File

@@ -2,6 +2,7 @@ package app
import (
"context"
"fmt"
"net/http"
"database.orly"
@@ -20,7 +21,11 @@ type Server struct {
}
func (s *Server) ServeHTTP(w http.ResponseWriter, r *http.Request) {
log.T.F("path %v header %v", r.URL, r.Header)
log.T.C(
func() string {
return fmt.Sprintf("path %v header %v", r.URL, r.Header)
},
)
if r.Header.Get("Upgrade") == "websocket" {
s.HandleWebsocket(w, r)
} else if r.Header.Get("Accept") == "application/nostr+json" {