feat: some updates

This commit is contained in:
Max Richter
2025-09-24 18:18:57 +02:00
parent b3c01bb43d
commit 26c303d9cf
32 changed files with 464 additions and 263 deletions

View File

@@ -17,13 +17,13 @@ func main() {
absRoot, err := filepath.Abs(*root)
must(err)
info, err := os.Stat(absRoot)
must(err)
if !info.IsDir() {
log.Fatal("root is not a directory")
}
// Catch-all route from "/" → serve files rooted in absRoot
http.Handle("/", handlers.NewFile(absRoot))
log.Printf("listening on %s, root=%s", *addr, absRoot)