2024-10-07 21:15:25 -04:00
|
|
|
//go:build js && wasm
|
|
|
|
|
|
|
|
|
|
package main
|
|
|
|
|
|
|
|
|
|
import (
|
|
|
|
|
"github.com/labstack/echo/v4"
|
2024-10-08 17:22:14 -04:00
|
|
|
"github.com/onsonr/sonr/internal/ctx"
|
2024-10-09 14:15:05 -04:00
|
|
|
"github.com/onsonr/sonr/pkg/nebula"
|
2024-10-07 21:15:25 -04:00
|
|
|
"github.com/onsonr/sonr/pkg/nebula/routes"
|
|
|
|
|
"github.com/syumai/workers"
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
func main() {
|
|
|
|
|
s := echo.New()
|
2024-10-08 17:22:14 -04:00
|
|
|
s.Use(ctx.UseSession)
|
2024-10-09 14:15:05 -04:00
|
|
|
nebula.UseAssets(s)
|
2024-10-07 21:15:25 -04:00
|
|
|
s.GET("/", routes.Home)
|
|
|
|
|
s.GET("/login", routes.LoginStart)
|
|
|
|
|
s.GET("/register", routes.RegisterStart)
|
|
|
|
|
workers.Serve(s)
|
|
|
|
|
}
|