--- /dev/null
+public
\ No newline at end of file
```
+11. Place "album" under public/images/album
-11. Run!
+The folder name should be exactly "album".
+
+The folder should contain at least three images
+
+- title image
+- groom
+- bride
+
+and needs to be sorted in that exac order.
+
+All other images will be displayed under "Gallery" sector.
+
+12. Run!
```shell
useOauth2: false
id: seantywork@gmail.com
pw: sample
-# the path under which folder named "album" is placed
-# album should contain at least three images
-# for title, groom, bride in that order
-album:
- addr: "public/images"
title: "Taehoon & Suya"
groom: "윤태훈"
bride: "반수야"
-p 8080:8080 \
-v ./data:/workspace/data \
-v ./log:/workspace/log \
+ -v ./public:/workspace/public
localhost/our-wedding-rsvp
\ No newline at end of file
Id string `yaml:"id"`
Pw string `yaml:"pw"`
} `yaml:"admin"`
- Album struct {
- Addr string `yaml:"addr"`
- }
Title string `yaml:"title"`
Groom string `yaml:"groom"`
Bride string `yaml:"bride"`
"os"
pkgserverapi "our-wedding-rsvp/pkg/server/api"
"path/filepath"
- "strings"
pkgauth "our-wedding-rsvp/pkg/auth"
pkgglob "our-wedding-rsvp/pkg/glob"
func configureServer(e *gin.Engine) error {
- if !strings.HasPrefix(pkgglob.G_CONF.Album.Addr, "public/") {
- return fmt.Errorf("album addr needs to start with 'public' prefix")
- }
-
- albumPath := filepath.Join(pkgglob.G_CONF.Album.Addr, "album")
+ albumPath := "./public/images/album"
if _, err := os.Stat(albumPath); err != nil {
return fmt.Errorf("album addr not found: %v", err)