func StartServer(config Config) {
	r := mux.NewRouter()

	r.HandleFunc(config.HealthEndpoint, handleHealth)

	loggedRouter := handlers.LoggingHandler(os.Stdout, r)
	err := http.ListenAndServe(
		fmt.Sprintf("%s:%d", config.Host, config.Port),
		loggedRouter,
	)

	if err != nil {
		log.Fatalf("Error while serving traffic: %s", err.Error())
	}
}
// StartServer sets up the server and starts listening for traffic
StartServer sets up the server and starts listening for traffic
// StartServer sets up the server and starts listening for traffic
func StartServer(config Config) {
	r := mux.NewRouter()
	r.HandleFunc(config.HealthEndpoint, handleHealth)
	loggedRouter := handlers.LoggingHandler(os.Stdout, r)
	err := http.ListenAndServe(
		fmt.Sprintf("%s:%d", config.Host, config.Port),
		loggedRouter,
	)
	if err != nil {
		log.Fatalf("Error while serving traffic: %s", err.Error())
	}
}
func StartServer ( config Config ) { r := mux . NewRouter ( ) r . HandleFunc ( config . HealthEndpoint , handleHealth ) loggedRouter := handlers . LoggingHandler ( os . Stdout , r ) err := http . ListenAndServe ( fmt . Sprintf ( " " , config . Host , config . Port ) , loggedRouter , ) if err != nil { log . Fatalf ( " " , err . Error ( ) ) } }
StartServer sets up the server and starts listening for traffic
StartServer sets up the server and starts listening for traffic