Switch from routes to self-registering handlers to group related routes.
This commit is contained in:
parent
8ca11c90e1
commit
59c10f1874
19 changed files with 719 additions and 717 deletions
|
|
@ -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() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue