Switch from routes to self-registering handlers to group related routes.

This commit is contained in:
mikestefanello 2024-06-09 12:31:30 -04:00
parent 8ca11c90e1
commit 59c10f1874
19 changed files with 719 additions and 717 deletions

View file

@ -9,7 +9,7 @@ import (
"os/signal"
"time"
"github.com/mikestefanello/pagoda/pkg/routes"
"github.com/mikestefanello/pagoda/pkg/handlers"
"github.com/mikestefanello/pagoda/pkg/services"
)
@ -23,7 +23,9 @@ func main() {
}()
// Build the router
routes.BuildRouter(c)
if err := handlers.BuildRouter(c); err != nil {
c.Web.Logger.Fatalf("failed to build the router: %v", err)
}
// Start the server
go func() {