hvanu commited on
Commit
a7ca764
·
1 Parent(s): ccf6424
Files changed (1) hide show
  1. main.go +8 -5
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
- // r.GET("/", func(c *gin.Context) {
140
- // // Load HTML templates from ./frontend folder
141
- // // Render the template by name
142
- // c.HTML(http.StatusOK, "index.html", gin.H{})
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) {