17 lines
274 B
Go
17 lines
274 B
Go
package controllers
|
|
|
|
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})
|
|
}
|