aboutsummaryrefslogtreecommitdiff
path: root/main.go
diff options
context:
space:
mode:
Diffstat (limited to 'main.go')
-rw-r--r--main.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/main.go b/main.go
index 480a501..3fba254 100644
--- a/main.go
+++ b/main.go
@@ -75,7 +75,11 @@ func main() {
backend.HandleRoot(r, cfg)
backend.HandleLogs(r)
- backend.HandleStaticFiles(r, "/assets", backend.UsableEmbedFS("dist", embeds))
+ if dev {
+ backend.HandleStaticFiles(r, "/assets", os.DirFS("dist"))
+ } else {
+ backend.HandleStaticFiles(r, "/assets", backend.UsableEmbedFS("dist", embeds))
+ }
backend.HandleStaticFiles(r, "/static", os.DirFS(publicDir))
slog.Info("starting http server")