- Go module: github.com/netcell-it/deklarix - cmd/server/main.go: HTTP entry point with /health endpoint - scripts/build.sh: cross-compile amd64 + arm64 - scripts/test.sh: go vet + race tests + build-check - scripts/release.sh: full release flow (test → build → tag → push) - packaging/DEBIAN: .deb control template - design/enterprise.css: enterprise design system from enconf - CLAUDE.md: complete build/test/release documentation - .claude/settings.local.json: Claude Code permissions
28 lines
477 B
Go
28 lines
477 B
Go
package main
|
|
|
|
import (
|
|
"fmt"
|
|
"log"
|
|
"net/http"
|
|
"os"
|
|
)
|
|
|
|
func main() {
|
|
port := os.Getenv("PORT")
|
|
if port == "" {
|
|
port = "8080"
|
|
}
|
|
addr := ":" + port
|
|
|
|
mux := http.NewServeMux()
|
|
mux.HandleFunc("/health", func(w http.ResponseWriter, r *http.Request) {
|
|
w.Header().Set("Content-Type", "application/json")
|
|
fmt.Fprintf(w, `{"ok":true}`)
|
|
})
|
|
|
|
log.Printf("Deklarix server starting on %s", addr)
|
|
if err := http.ListenAndServe(addr, mux); err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
}
|