Example #1
0
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)
}
Example #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()
}