about summary refs log tree commit diff stats
path: root/cmd/server/main.go
diff options
context:
space:
mode:
authorAlan Pearce2024-06-26 18:45:56 +0200
committerAlan Pearce2024-06-26 18:45:56 +0200
commit767caaab43143fd5e22bbea044f1aa83ebb13517 (patch)
tree5d2b23060de8fa5dbf561317f97e8a874cbaf190 /cmd/server/main.go
parentaa6d63c3539f9243d1b325f3585faddcf7d01070 (diff)
downloadwebsite-767caaab43143fd5e22bbea044f1aa83ebb13517.tar.lz
website-767caaab43143fd5e22bbea044f1aa83ebb13517.tar.zst
website-767caaab43143fd5e22bbea044f1aa83ebb13517.zip
fix empty initial build in dev
Diffstat (limited to 'cmd/server/main.go')
-rw-r--r--cmd/server/main.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/cmd/server/main.go b/cmd/server/main.go
index 1388463..d73e19f 100644
--- a/cmd/server/main.go
+++ b/cmd/server/main.go
@@ -25,6 +25,13 @@ func main() {
 	}
 	log.Configure(!runtimeConfig.Development)
 
+	tmpdir, err := os.MkdirTemp("", "website")
+	if err != nil {
+		log.Fatal("could not create temporary directory", "error", err)
+	}
+	defer os.RemoveAll(tmpdir)
+	runtimeConfig.Root = tmpdir
+
 	sv, err := server.New(&runtimeConfig)
 	if err != nil {
 		log.Error("could not create server", "error", err)