Initial Beach: homelab control panel

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
VeillaxandClaude Sonnet 5.5 committed 2026-10-27 16:57:53 -06:00
commit 6938da4d7a
18 files changed
+2071

No files matched your search

+26
View File
@@ -0,0 +1,26 @@
// Beach is a one-page control panel for a homelab: containers, disks, host load and tunnels.
package main
import (
"flag"
"log"
"net/http"
"time"
"beach/internal/beach"
)
func main() {
listen := flag.String("listen", ":8095", "address to listen on")
data := flag.String("data", "beach.db", "path of the SQLite file")
flag.Parse()
st, err := beach.OpenStore(*data)
if err != nil {
log.Fatal(err)
}
defer st.Close()
srv := &http.Server{Addr: *listen, Handler: beach.NewServer(st), ReadHeaderTimeout: 10 * time.Second}
log.Printf("Beach listening on %s (data: %s)", *listen, *data)
log.Fatal(srv.ListenAndServe())
}