first successful export
This commit is contained in:
12
main.go
12
main.go
@@ -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")))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user