feat: some stuff?
All checks were successful
Build and Push Server / build-and-push (push) Successful in 4m19s

This commit is contained in:
2026-02-10 18:24:39 +01:00
parent 137e3da6d4
commit f9c4b7bc05
7 changed files with 26 additions and 16 deletions

View File

@@ -35,12 +35,13 @@ func main() {
absPlaygroundRoot, err := filepath.Abs(*playgroundRoot)
must(err)
info, err := os.Stat(absPlaygroundRoot)
must(err)
if !info.IsDir() {
log.Fatalf("playground-root %s is not a directory", *playgroundRoot)
if err == nil {
if !info.IsDir() {
log.Fatalf("playground-root %s is not a directory", *playgroundRoot)
}
log.Printf("serving playground from %s", absPlaygroundRoot)
http.Handle("/_playground/", http.StripPrefix("/_playground/", http.FileServer(http.Dir(absPlaygroundRoot))))
}
log.Printf("serving playground from %s", absPlaygroundRoot)
http.Handle("/_playground/", http.StripPrefix("/_playground/", http.FileServer(http.Dir(absPlaygroundRoot))))
}
if len(roots) == 0 {