diff options
Diffstat (limited to 'app')
| -rw-r--r-- | app/app.go | 6 | ||||
| -rw-r--r-- | app/config.go | 3 |
2 files changed, 8 insertions, 1 deletions
@@ -162,6 +162,12 @@ func (a *App) Run() error { } a.Watcher.Add(p.Path) } + if err := os.MkdirAll(a.Config.Server.UploadPath, 0755); err != nil { + return fmt.Errorf( + "error creating upload path %s: %w", + a.Config.Server.UploadPath, err, + ) + } buildFeed(a) go startWatcher(a) return http.Serve(a.Listener, a.Router) diff --git a/app/config.go b/app/config.go index 4d72657..9c0e733 100644 --- a/app/config.go +++ b/app/config.go @@ -64,6 +64,7 @@ func DefaultConfig() *Config { Server: &ServerConfig{ Host: "0.0.0.0", Port: 8000, + StorePath: "tube.db", UploadPath: "uploads", MaxUploadSize: 104857600, }, @@ -74,7 +75,7 @@ func DefaultConfig() *Config { Timeout: 300, }, Feed: &FeedConfig{ - ExternalURL: "http://localhost", + ExternalURL: "http://localhost:8000", }, } } |
