Added index, improved logic

This commit is contained in:
2025-08-07 22:08:48 +02:00
parent 84cdd52322
commit 6bcedf84f6
8 changed files with 159 additions and 43 deletions

19
endpoints/index.go Normal file
View File

@@ -0,0 +1,19 @@
package endpoints
import (
"net/http"
"os"
"github.com/gin-gonic/gin"
)
func HandleIndex(c *gin.Context) {
baseURL := os.Getenv("BASE_URL")
if baseURL == "" {
baseURL = "http://localhost:8080"
}
c.HTML(http.StatusOK, "index.html", gin.H{
"BaseURL": baseURL,
})
}