2024-09-18 02:22:17 -04:00
|
|
|
package dwn
|
2024-09-11 15:10:54 -04:00
|
|
|
|
|
|
|
|
import (
|
|
|
|
|
"github.com/labstack/echo/v4"
|
2024-09-18 02:22:17 -04:00
|
|
|
"github.com/onsonr/sonr/internal/dwn/front"
|
|
|
|
|
"github.com/onsonr/sonr/internal/dwn/handlers"
|
|
|
|
|
"github.com/onsonr/sonr/internal/dwn/middleware"
|
2024-09-11 15:10:54 -04:00
|
|
|
)
|
|
|
|
|
|
2024-09-18 02:22:17 -04:00
|
|
|
// NewServer creates a new dwn server using echo
|
|
|
|
|
func NewServer() *echo.Echo {
|
2024-09-16 01:06:00 -04:00
|
|
|
e := echo.New()
|
2024-09-18 02:22:17 -04:00
|
|
|
e.Use(middleware.UseSession)
|
|
|
|
|
front.RegisterViews(e)
|
|
|
|
|
handlers.RegisterState(e)
|
2024-09-16 01:06:00 -04:00
|
|
|
return e
|
2024-09-11 15:10:54 -04:00
|
|
|
}
|