feat: added a single development cli command
This commit is contained in:
@@ -6,6 +6,7 @@ import (
|
||||
"io"
|
||||
"log"
|
||||
"path"
|
||||
"phc/website/services/config"
|
||||
"phc/website/services/server/routes"
|
||||
"phc/website/sl"
|
||||
|
||||
@@ -84,6 +85,11 @@ func Configure(l *sl.ServiceLocator) (*devService, error) {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
config, _ := sl.Use(l, config.Slot)
|
||||
if config.Mode != "development" {
|
||||
return d, nil
|
||||
}
|
||||
|
||||
r.Get("/api/development/routes", func(c *fiber.Ctx) error {
|
||||
return c.JSON(map[string]any{
|
||||
"static": d.staticRoutes,
|
||||
|
||||
Reference in New Issue
Block a user