diff options
author | Vidhu Kant Sharma <bokuwakanojogahoshii@yahoo.com> | 2021-04-08 20:20:31 +0530 |
---|---|---|
committer | Vidhu Kant Sharma <bokuwakanojogahoshii@yahoo.com> | 2021-04-08 20:20:31 +0530 |
commit | c866ff3317bd86facf8dfa14edd2064fed10c09f (patch) | |
tree | 335902d61c27ca4c65fad5e567327e89b5799410 /main.go | |
parent | b33e3fe60f4ae7eff88ab1ca28f45f94d2d9d713 (diff) |
worked on the main page
Diffstat (limited to 'main.go')
-rw-r--r-- | main.go | 14 |
1 files changed, 10 insertions, 4 deletions
@@ -16,12 +16,13 @@ func main() { router.Use(gin.Logger()) router.LoadHTMLGlob("templates/*") - // css static routes + // static routes router.Static("/css", "static/css") router.Static("/old/css", "static/css/old") - // js static routes - /*router.Static("/scripts", "static/scripts") - router.Static("/media", "static/media")*/ + + router.Static("/media", "static/media") + + //router.Static("/scripts", "static/scripts") // serve classic themed pages router.GET("/old", func (c *gin.Context) { @@ -40,5 +41,10 @@ func main() { fmt.Println(name) }) + // serve new themed pages + router.GET("/", func (c *gin.Context) { + c.HTML(http.StatusOK, "index.html", nil) + }) + router.Run(":" + port) } |