first successful export

This commit is contained in:
2026-02-25 00:27:36 -08:00
parent b70ea7e877
commit 68ccc2f4fc
14 changed files with 163 additions and 207 deletions

12
main.go
View File

@@ -11,16 +11,11 @@ import (
)
func main() {
redisAddr := "localhost:6379"
if addr := os.Getenv("REDIS_ADDR"); addr != "" {
redisAddr = addr
}
st, err := store.New(redisAddr)
st, err := store.New()
if err != nil {
log.Fatalf("redis: %v", err)
log.Fatalf("store: %v", err)
}
log.Printf("Connected to Redis at %s", redisAddr)
log.Println("Temp storage ready")
hub := ws.NewHub()
go hub.Run()
@@ -33,7 +28,6 @@ func main() {
mux.HandleFunc("/export", handlers.ExportHandler(st, hub))
mux.Handle("/download/", http.StripPrefix("/download/", handlers.DownloadHandler(st)))
// Serve the React build in production
if _, err := os.Stat("frontend/dist"); err == nil {
mux.Handle("/", http.FileServer(http.Dir("frontend/dist")))
}