// // main.go // Copyright (C) 2024 veypi // 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() }