init backend and dev docs

This commit is contained in:
2026-01-21 21:10:45 +01:00
parent 40ebd55865
commit 19ec9f3c17
7 changed files with 127 additions and 0 deletions

25
backend/cmd/app/main.go Normal file
View File

@@ -0,0 +1,25 @@
package main
import (
"net/http"
"os"
"github.com/gin-gonic/gin"
)
func main() {
// Config simple : port via PORT, defaut 8080.
port := os.Getenv("PORT")
if port == "" {
port = "8080"
}
r := gin.Default()
// Route de sante pour verifier que le backend repond.
r.GET("/healthz", func(c *gin.Context) {
c.JSON(http.StatusOK, gin.H{"status": "ok"})
})
_ = r.Run(":" + port)
}

5
backend/go.mod Normal file
View File

@@ -0,0 +1,5 @@
module gitea.maison43.duckdns.org/gilles/matosbox
go 1.23
require github.com/gin-gonic/gin v1.10.0