mirror of
https://github.com/wgh136/nysoure.git
synced 2025-12-16 15:51:14 +00:00
feat: prometheus
This commit is contained in:
4
main.go
4
main.go
@@ -6,7 +6,9 @@ import (
|
||||
"nysoure/server/middleware"
|
||||
|
||||
"github.com/gofiber/fiber/v3"
|
||||
"github.com/gofiber/fiber/v3/middleware/adaptor"
|
||||
"github.com/gofiber/fiber/v3/middleware/logger"
|
||||
prom "github.com/prometheus/client_golang/prometheus/promhttp"
|
||||
)
|
||||
|
||||
func main() {
|
||||
@@ -29,6 +31,8 @@ func main() {
|
||||
|
||||
app.Use(middleware.FrontendMiddleware)
|
||||
|
||||
app.Get("/metrics", adaptor.HTTPHandler(prom.Handler()))
|
||||
|
||||
apiG := app.Group("/api")
|
||||
{
|
||||
api.AddUserRoutes(apiG)
|
||||
|
||||
Reference in New Issue
Block a user