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/new/cli/main.go

36 lines
582 B
Go

//
// main.go
// Copyright (C) 2024 veypi <i@veypi.com>
// 2025-03-04 16:08:06
// Distributed under terms of the MIT license.
//
package main
import (
app "oa"
"oa/cfg"
"github.com/veypi/OneBD/rest"
"github.com/veypi/utils/logv"
)
func main() {
CMD.Command = runWeb
CMD.Parse()
err := CMD.Run()
if err != nil {
logv.Warn().Msg(err.Error())
}
}
func runWeb() error {
server, err := rest.New(rest.WithHost(cfg.Config.Host), rest.WithPort(cfg.Config.Port))
if err != nil {
return err
}
server.SetRouter(app.Router)
server.Router().Print()
return server.Run()
}