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.
26 lines
407 B
Go
26 lines
407 B
Go
package main
|
|
|
|
import (
|
|
"flag"
|
|
|
|
"zero/core/conf"
|
|
"zero/rest"
|
|
"zero/tools/goctl/api/demo/config"
|
|
"zero/tools/goctl/api/demo/handler"
|
|
)
|
|
|
|
var configFile = flag.String("f", "etc/user.json", "the config file")
|
|
|
|
func main() {
|
|
flag.Parse()
|
|
|
|
var c config.Config
|
|
conf.MustLoad(*configFile, &c)
|
|
|
|
engine := rest.MustNewEngine(c.RtConf)
|
|
defer engine.Stop()
|
|
|
|
handler.RegisterHandlers(engine)
|
|
engine.Start()
|
|
}
|