fix: add missing cmd/server/main.go and fix .gitignore

The .gitignore pattern "server" was matching cmd/server/ directory,
preventing main.go from being tracked. Anchored binary patterns to
repo root with leading slash.
This commit is contained in:
m
2026-04-14 16:04:30 +02:00
parent 483afd8154
commit d2a9164e36
2 changed files with 26 additions and 2 deletions

24
cmd/server/main.go Normal file
View File

@@ -0,0 +1,24 @@
package main
import (
"log"
"net/http"
"os"
"mgit.msbls.de/m/patholo/internal/handlers"
)
func main() {
port := os.Getenv("PORT")
if port == "" {
port = "8080"
}
mux := http.NewServeMux()
handlers.Register(mux)
log.Printf("patholo server starting on :%s", port)
if err := http.ListenAndServe(":"+port, mux); err != nil {
log.Fatal(err)
}
}