Spaces:
Running
Running
Update
Browse files
main.go
CHANGED
@@ -136,11 +136,14 @@ func main() {
|
|
136 |
// Serve static files from ./frontend, no directory listing
|
137 |
r.StaticFS("/assets", gin.Dir("./assets", false))
|
138 |
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
|
|
|
|
|
|
144 |
|
145 |
// Route to serve parsed HTML template partials
|
146 |
r.GET("/partials", func(c *gin.Context) {
|
|
|
136 |
// Serve static files from ./frontend, no directory listing
|
137 |
r.StaticFS("/assets", gin.Dir("./assets", false))
|
138 |
|
139 |
+
r.GET("/", func(c *gin.Context) {
|
140 |
+
// Load HTML templates from ./frontend folder
|
141 |
+
// Render the template by name
|
142 |
+
r.LoadHTMLFiles("index.html")
|
143 |
+
// Render the template by name
|
144 |
+
|
145 |
+
c.HTML(http.StatusOK, "index.html", gin.H{})
|
146 |
+
})
|
147 |
|
148 |
// Route to serve parsed HTML template partials
|
149 |
r.GET("/partials", func(c *gin.Context) {
|