func main() { err := jq.Init() if err != nil { log.Fatal(err) } log.WithFields(log.Fields{ "version": jq.Version, "path": jq.Path, }).Info("initialized jq") conf, err := config.Load() if err != nil { log.Fatal(err) } log.WithFields(log.Fields{ "host": conf.Host, "port": conf.Port, }).Infof("Starting server at %s:%s", conf.Host, conf.Port) srv := server.New(conf) err = srv.Start() if err != nil { log.WithError(err).Fatal("error starting sever") } }
func main() { err := jq.Init() if err != nil { log.Fatal(err) } log.Printf("jq version=%s path=%s\n", jq.Version, jq.Path) port := os.Getenv("PORT") if port == "" { port = "3000" } c := &server.Config{ Port: port, Env: os.Getenv("JQPLAY_ENV"), NewRelicLicenseKey: os.Getenv("NEW_RELIC_LICENSE_KEY"), JQVersion: jq.Version, } log.Printf("Starting server at %s\n", c.Port) s := server.New(c) s.Start() }