another fix
This commit is contained in:
@@ -80,6 +80,7 @@ func main() {
|
||||
downloadHandler := downloads.NewHandler(galleryRepository, mediaRepository, objectStorage, authService, downloadService)
|
||||
devHandler := devtools.NewHandler(database, objectStorage, authService, devtools.Config{
|
||||
DBDriver: cfg.DBDriver,
|
||||
APIURL: cfg.APIURL,
|
||||
StorageEndpoint: cfg.StorageEndpoint,
|
||||
StorageBucket: cfg.StorageBucket,
|
||||
StorageUseSSL: cfg.StorageUseSSL,
|
||||
@@ -113,7 +114,11 @@ func main() {
|
||||
}
|
||||
|
||||
go func() {
|
||||
log.Printf("API listening on http://localhost%s", server.Addr)
|
||||
addr := cfg.APIURL
|
||||
if addr == "" {
|
||||
addr = "http://localhost" + server.Addr
|
||||
}
|
||||
log.Printf("API listening on %s", addr)
|
||||
if err := server.ListenAndServe(); err != nil && err != http.ErrServerClosed {
|
||||
log.Fatalf("server failed: %v", err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user