Example #1
0
File: main.go Project: devhq-io/ax
func main() {
	port := 2000
	setupLogger("stdout")
	startGcLoop(1000)
	c := &ax.Config{UseTls: false, ConnectionTimeout: 300}
	r := ax.Setup(c)
	setupRoutes(r)
	setMessageHandlers()
	start(port)
}
Example #2
0
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)
}