func main() { port := 2000 setupLogger("stdout") startGcLoop(1000) c := &ax.Config{UseTls: false, ConnectionTimeout: 300} r := ax.Setup(c) setupRoutes(r) setMessageHandlers() start(port) }
func main() { port := config.C().HttpServerPort connTimeout := config.C().ConnectionTimeout logtype := config.C().LogType if logtype == "" { logtype = "stdout" } setupLogger(logtype) startGcLoop(1000) usetls := config.C().HttpServerUseTls c := &ax.Config{ConnectionTimeout: connTimeout, UseTls: usetls} r := ax.Setup(c) setupRoutes(r) setMessageHandlers() start(r, port, usetls) }