func NewServer(journey Journey, logger *logrus.Entry, version version.Checker) *Server {
	server := &Server{
		Echo:    echo.New(),
		logger:  logger,
		version: version,
	}
	server.Validator = newEchoValidatorAdapter()
	server.HideBanner = true

	// Use custom logger config so that we can control where log lines like below get sent to - either /dev/null or stdout.
	// {"time":"2018-12-18T13:00:40.291032Z","id":"","remote_ip":"192.0.2.1","host":"example.com","method":"POST","uri":"/api/config/global?pretty","status":400, "latency":627320,"latency_human":"627.32µs","bytes_in":0,"bytes_out":137}
	server.Use(middleware.LoggerWithConfig(middleware.LoggerConfig{
		Output: logger.Writer(),
	}))
	server.Use(middleware.Recover())
	// TODO(mbana): figure out if this will break the downloading the report.zip file from the `/api/export` route.
	// https://github.com/labstack/echo/issues/873. If it doesn't break it, enable Gzip compression.
	// Another approach is to skip `/api/export` route using a skipper, see https://github.com/labstack/echo/issues/964.
	server.Use(middleware.GzipWithConfig(middleware.GzipConfig{
		// level between 1-9
		// where 1 indicates the fastest compression (less compression), and
		// 9 indicates the slowest compression method (best compression)
		Level:   5,
		Skipper: skipperGzip,
	}))

	// serve Vue.js site
	server.Use(middleware.StaticWithConfig(middleware.StaticConfig{
		Skipper: skipperSwagger,
		Root:    "web/dist",
		Index:   "index.html",
		HTML5:   true,
		Browse:  false,
	}))

	registerRoutes(journey, server, logger, version)

	return server
}
// NewServer returns new echo.Echo server.
NewServer returns new echo.Echo server.
// NewServer returns new echo . Echo server .
func NewServer(journey Journey, logger *logrus.Entry, version version.Checker) *Server {
	server := &Server{
		Echo:    echo.New(),
		logger:  logger,
		version: version,
	}
	server.Validator = newEchoValidatorAdapter()
	server.HideBanner = true
	server.Use(middleware.LoggerWithConfig(middleware.LoggerConfig{
		Output: logger.Writer(),
	}))
	server.Use(middleware.Recover())
	server.Use(middleware.GzipWithConfig(middleware.GzipConfig{
		Level:   5,
		Skipper: skipperGzip,
	}))
	server.Use(middleware.StaticWithConfig(middleware.StaticConfig{
		Skipper: skipperSwagger,
		Root:    "web/dist",
		Index:   "index.html",
		HTML5:   true,
		Browse:  false,
	}))
	registerRoutes(journey, server, logger, version)
	return server
}
func NewServer ( journey Journey , logger * logrus . Entry , version version . Checker ) * Server { server := & Server { Echo : echo . New ( ) , logger : logger , version : version , } server . Validator = newEchoValidatorAdapter ( ) server . HideBanner = true server . Use ( middleware . LoggerWithConfig ( middleware . LoggerConfig { Output : logger . Writer ( ) , } ) ) server . Use ( middleware . Recover ( ) ) server . Use ( middleware . GzipWithConfig ( middleware . GzipConfig { Level : 5 , Skipper : skipperGzip , } ) ) server . Use ( middleware . StaticWithConfig ( middleware . StaticConfig { Skipper : skipperSwagger , Root : " " , Index : " " , HTML5 : true , Browse : false , } ) ) registerRoutes ( journey , server , logger , version ) return server }
NewServer returns new echo.Echo server.
NewServer returns new echo . Echo server .
// Use custom logger config so that we can control where log lines like below get sent to - either /dev/null or stdout. // {"time":"2018-12-18T13:00:40.291032Z","id":"","remote_ip":"192.0.2.1","host":"example.com","method":"POST","uri":"/api/config/global?pretty","status":400, "latency":627320,"latency_human":"627.32µs","bytes_in":0,"bytes_out":137} // TODO(mbana): figure out if this will break the downloading the report.zip file from the `/api/export` route. // https://github.com/labstack/echo/issues/873. If it doesn't break it, enable Gzip compression. // Another approach is to skip `/api/export` route using a skipper, see https://github.com/labstack/echo/issues/964. // level between 1-9 // where 1 indicates the fastest compression (less compression), and // 9 indicates the slowest compression method (best compression) // serve Vue.js site