actually serve public
This commit is contained in:
parent
8eabde60fd
commit
438c70b41b
4
main.go
4
main.go
@ -2,6 +2,7 @@ package main
|
||||
|
||||
import (
|
||||
"context"
|
||||
"log/slog"
|
||||
"net/http"
|
||||
"os"
|
||||
|
||||
@ -46,6 +47,7 @@ func main() {
|
||||
r.Post("/user/login", s.Login)
|
||||
r.With(serve.WithSession(sessions)).Get("/user/me", s.Me)
|
||||
r.With(serve.WithSession(sessions)).Get("/queue", s.Queue)
|
||||
r.Method("GET", "/", http.FileServer(http.Dir(public)))
|
||||
r.Method("GET", "/*", http.FileServer(http.Dir(public)))
|
||||
slog.Info("listening", "addr", addr, "public", public)
|
||||
http.ListenAndServe(addr, r)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user