mirror of
https://github.com/sonr-io/sonr.git
synced 2026-08-02 17:31:39 +00:00
feat: move gateway web code to dedicated directory
This commit is contained in:
Executable
BIN
Binary file not shown.
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"name": "@onsonr/sonr.id",
|
||||
"version": "0.0.2",
|
||||
"scripts": {},
|
||||
"dependencies": {}
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
//go:build js && wasm
|
||||
|
||||
package main
|
||||
|
||||
import (
|
||||
"github.com/labstack/echo/v4"
|
||||
"github.com/onsonr/sonr/internal/ctx"
|
||||
"github.com/onsonr/sonr/pkg/nebula/routes"
|
||||
"github.com/syumai/workers"
|
||||
)
|
||||
|
||||
func main() {
|
||||
s := echo.New()
|
||||
s.Use(ctx.UseSession)
|
||||
|
||||
s.GET("/", routes.Home)
|
||||
s.GET("/login", routes.LoginStart)
|
||||
s.GET("/register", routes.RegisterStart)
|
||||
workers.Serve(s)
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
name = "sonr-id"
|
||||
main = "./build/worker.mjs"
|
||||
compatibility_date = "2024-10-07"
|
||||
|
||||
[build]
|
||||
command = "devbox run build:hway"
|
||||
Reference in New Issue
Block a user