func init() { flag.Set("v", "1") flag.Set("stderrthreshold", "ERROR") utils.IsTesting = true utils.LoadConfig("../../config/config.json") _s = NewStore() _conn, _ = setupConnectionPGX(utils.Cfg.StorageSettings) }
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() }