ncDocConverter/cmd/ncDocConverth/routes.go

21 lines
406 B
Go

package main
import (
"net/http"
"github.com/go-chi/chi/v5"
"github.com/go-chi/chi/v5/middleware"
"rpjosh.de/ncDocConverter/internal/api"
)
func (app *WebApplication) routes() http.Handler {
api := api.Api{Logger: app.logger, Config: app.config}
router := chi.NewRouter()
router.Use(middleware.RealIP, app.recoverPanic, app.logRequest, secureHeaders)
api.SetupServer(router)
return router
}