17 lines
326 B
Go
17 lines
326 B
Go
|
package router
|
||
|
|
||
|
import (
|
||
|
"github.com/ekzyis/hermes/pages"
|
||
|
"github.com/labstack/echo/v4"
|
||
|
)
|
||
|
|
||
|
func Init(e *echo.Echo, hc Context) {
|
||
|
e.GET("/", HandleIndex(hc))
|
||
|
}
|
||
|
|
||
|
func HandleIndex(hc Context) echo.HandlerFunc {
|
||
|
return func(ec echo.Context) error {
|
||
|
return pages.Index().Render(hc.WithContext(ec), ec.Response().Writer)
|
||
|
}
|
||
|
}
|