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.
OneAuth/init.go

30 lines
549 B
Go

11 months ago
//
// Copyright (C) 2025 veypi <i@veypi.com>
// 2025-03-04 16:08:06
// Distributed under terms of the MIT license.
//
3 weeks ago
package vbase
11 months ago
import (
"embed"
3 weeks ago
"github.com/veypi/vbase/api"
vhtmlui "github.com/veypi/vhtml-ui"
"github.com/veypi/vigo"
"github.com/veypi/vigo/contrib/cors"
"github.com/veypi/vigo/contrib/vhtml"
11 months ago
)
var Router = vigo.NewRouter()
11 months ago
//go:embed ui/*
var uifs embed.FS
func init() {
3 weeks ago
Router.Extend("v", vhtmlui.Router)
Router.Extend("api", api.Router)
Router.SubRouter("/**").Use(cors.AllowAny)
3 weeks ago
vhtml.WrapUI(Router, uifs)
}