mirror of https://github.com/veypi/OneAuth.git
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
30 lines
536 B
Go
30 lines
536 B
Go
//
|
|
// Copyright (C) 2025 veypi <i@veypi.com>
|
|
// 2025-03-04 16:08:06
|
|
// Distributed under terms of the MIT license.
|
|
//
|
|
|
|
package vbase
|
|
|
|
import (
|
|
"embed"
|
|
|
|
"github.com/veypi/vbase/api"
|
|
"github.com/veypi/vhtml"
|
|
vhtmlui "github.com/veypi/vhtml-ui"
|
|
"github.com/veypi/vigo"
|
|
"github.com/veypi/vigo/contrib/cors"
|
|
)
|
|
|
|
var Router = vigo.NewRouter()
|
|
|
|
//go:embed ui/*
|
|
var uifs embed.FS
|
|
|
|
func init() {
|
|
Router.Extend("v", vhtmlui.Router)
|
|
Router.Extend("api", api.Router)
|
|
Router.SubRouter("/**").Use(cors.AllowAny)
|
|
vhtml.WrapUI(Router, uifs)
|
|
}
|