Added cleanup logic.
This commit is contained in:
16
controllers/index.go
Normal file
16
controllers/index.go
Normal file
@@ -0,0 +1,16 @@
|
||||
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})
|
||||
}
|
||||
Reference in New Issue
Block a user