diff options
Diffstat (limited to 'main.go')
| -rw-r--r-- | main.go | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -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") |
