travebing/backend/main.go

26 lines
404 B
Go
Raw Permalink Normal View History

2024-11-19 16:58:21 +08:00
package main
import (
"flag"
"pkg.bing89.com/travebing/config"
"pkg.bing89.com/travebing/server"
)
func main(){
conf := ""
flag.StringVar(&conf, "config", "/etc/travebing/config.yaml", "config file")
flag.Parse()
cfg, err := config.NewConfig(conf)
if err != nil {
panic(err)
}
svr, err := server.New(cfg)
if err != nil {
panic(err)
}
err = svr.Run()
if err != nil {
panic(err)
}
}