示例#1
0
文件: main.go 项目: gebv/hey-client
func main() {
	flag.Parse()

	api.NewServer()
	api.InitApi()

	api.StartServer()

	api.AuthorizedAtHeyService()

	c := make(chan os.Signal)
	signal.Notify(c, os.Interrupt, syscall.SIGINT, syscall.SIGTERM)
	<-c

	api.StopServer()
}
示例#2
0
文件: main.go 项目: gebv/magickeys
func main() {
	flag.StringVar(&flagConfigFile, "config", "config.json", "")

	flag.Parse()

	utils.LoadConfig(flagConfigFile)

	api.NewServer()
	api.InitApi()
	web.InitWeb()
	api.StartServer()

	c := make(chan os.Signal)
	signal.Notify(c, os.Interrupt, syscall.SIGINT, syscall.SIGTERM)
	<-c

	api.StopServer()
}