diff --git a/examples/app_upload_download_photo.go b/examples/app_upload_download_photo.go index d4f2568..9da911d 100644 --- a/examples/app_upload_download_photo.go +++ b/examples/app_upload_download_photo.go @@ -9,6 +9,10 @@ func main() { logger.Level = 4 app := sampleapp.New() var err error + err = app.Create() + if err != nil { + logger.Critical(err.Error()) + } err = app.Start() if err != nil { logger.Critical(err.Error()) diff --git a/examples/download_photo.go b/examples/download_photo.go index 811594f..c02e9bd 100644 --- a/examples/download_photo.go +++ b/examples/download_photo.go @@ -8,7 +8,7 @@ import ( ) func main() { - uuid := os.Getenv("PHOTOPRISM_ID") + uuid := os.Getenv("PHOTOPRISM_UUID") if uuid == "" { halt(2, "Missing PHOTOPRISM_UUID") } @@ -17,5 +17,6 @@ func main() { if err != nil { halt(3, "Error fetching photo: %v", err) } + fmt.Println(*photo) } diff --git a/sample-app/pcreate b/sample-app/pcreate index 556c164..be4a764 100755 --- a/sample-app/pcreate +++ b/sample-app/pcreate @@ -1,3 +1,4 @@ + #!/bin/bash #################################### ##### @@ -8,4 +9,7 @@ # Startup Script for the Application #################################### echo "Creating [SampleApp]" -docker run -d --name photoprism -p 8080:2342 -e PHOTOPRISM_UPLOAD_NSFW="true" -e PHOTOPRISM_ADMIN_PASSWORD="missy" -v "/home/nova/go/src/github.com/kris-nova/client-go/sample-app/photoprism":"/photoprism" photoprism/photoprism + +docker run -d --name photoprism -p 8080:2342 -e PHOTOPRISM_UPLOAD_NSFW="true" -e PHOTOPRISM_ADMIN_PASSWORD="missy" -v photoprism:/photoprism photoprism/photoprism:latest + +