skeleton for testing purposes

This commit is contained in:
lin committed 2026-10-05 14:17:03 +02:00
1 parent 8076b30e3f
commit 71e4f1294e
11 files changed
+273

No files matched your search

+30
View File
@@ -0,0 +1,30 @@
package http_internal
import "net/http"
type AppServer struct {
srv *http.Server
mux *http.ServeMux
}
func NewAppServer() *AppServer {
mux := http.NewServeMux()
fs := http.FileServer(http.Dir("web/"))
mux.Handle("/", fs)
srv := &http.Server{
Addr: "localhost:1234",
Handler: mux,
}
return &AppServer{
srv: srv,
mux: mux,
}
}
func (srv *AppServer) Start() {
srv.srv.ListenAndServe()
}