Esempio n. 1
0
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()
}
Esempio n. 2
0
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()
}