kit/pkg/web2/routes.go

19 lines
532 B
Go
Raw Permalink Normal View History

2023-08-30 13:58:44 +00:00
package web2
import (
"github.com/gofiber/fiber/v2"
)
func (s *Server) Routes() {
s.router.Get("/hello", func(c *fiber.Ctx) error {
return c.SendString("Hello, World!")
})
//s.router.Get("/login", adaptor.HTTPHandlerFunc(auth.LoginHandler))
// http.HandlerFunc -> fiber.Handler
//app.Get("/greet", adaptor.HTTPHandlerFunc(greet)
// where : func greet(w http.ResponseWriter, r *http.Request) { }
//app.Get("/greet", adaptor.HTTPHandler(handler(greet))
// where : func handler(f http.HandlerFunc) http.Handler { }
}