in service/main.go [52:67]
func main() {
config := getConfig()
store := s3.New(config.Bucket, config.Profile)
http.HandleFunc("/healthcheck", middleware.WithRequestLog(http.HandlerFunc(ok)))
if config.RequireAuth {
http.Handle("/", middleware.WithRequestLog(middleware.WithAuth(middleware.WithDomainPrefix(storeServer(store)))))
} else {
http.Handle("/", middleware.WithRequestLog(middleware.WithDomainPrefix(storeServer(store))))
}
log.Printf("Server starting on http://localhost:%s.", config.Port)
err := http.ListenAndServe(fmt.Sprintf(":%s", config.Port), nil)
log.Fatal(err.Error())
}