aboutsummaryrefslogtreecommitdiff
path: root/main.go
diff options
context:
space:
mode:
Diffstat (limited to 'main.go')
-rw-r--r--main.go12
1 files changed, 10 insertions, 2 deletions
diff --git a/main.go b/main.go
index d7354e3..b7f035a 100644
--- a/main.go
+++ b/main.go
@@ -19,12 +19,20 @@ func main() {
router := gin.New()
router.Use(gin.Logger())
- router.LoadHTMLGlob("templates/*.html")
+ router.LoadHTMLGlob("templates/*")
router.Static("/static", "static")
- router.GET("/", func(c *gin.Context) {
+ router.GET("/en", func(c *gin.Context) {
+ c.HTML(http.StatusOK, "en.index.html", nil)
+ })
+
+ router.GET("/jp", func(c *gin.Context) {
c.HTML(http.StatusOK, "jp.index.html", nil)
})
+ router.GET("/", func(c *gin.Context) {
+ c.HTML(http.StatusOK, "redirect.index.html", nil)
+ })
+
router.Run(":" + port)
}