Serve media from drive via fully in-memory blob store

This commit is contained in:
Ian Gulliver
2026-08-15 21:18:33 -07:00
parent 00239d027c
commit 6c0b1d34c5
8 changed files with 377 additions and 32 deletions
+8
View File
@@ -9,6 +9,7 @@ import (
"os"
"heliosian/internal/auth"
"heliosian/internal/blob"
"heliosian/internal/data"
"heliosian/internal/directory"
)
@@ -72,6 +73,13 @@ func main() {
mux := http.NewServeMux()
authn.Register(mux)
directory.Register(mux, cache)
if os.Getenv("DIRECTORY_SHEET") != "" {
store, err := blob.New()
if err != nil {
log.Fatalf("[ERROR] blob store: %v", err)
}
blob.Register(mux, store)
}
mux.Handle("GET /{$}", http.RedirectHandler("/people", http.StatusFound))
mux.Handle("GET /static/", http.StripPrefix("/static/", http.FileServer(http.Dir("web/static"))))
port := os.Getenv("PORT")