diff options
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) } |