package web import ( "net/http" "github.com/go-chi/chi" "bitmask.me/skeleton/internal/app" ) func runHTTP(listenAddr string, h http.Handler) error { server := &http.Server{ Addr: listenAddr, Handler: h, } return server.ListenAndServe() } // RunServer starts the web server func RunServer(ac *app.App, listenAddr string) { r := chi.NewMux() registerRoutes(ac, r) runHTTP(listenAddr, r) }