travebing/backend/main.go

26 lines
404 B
Go

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)
}
}