diff options
author | MikunoNaka <bokuwakanojogahoshii@yahoo.com> | 2021-07-15 16:40:24 +0530 |
---|---|---|
committer | MikunoNaka <bokuwakanojogahoshii@yahoo.com> | 2021-07-15 16:40:24 +0530 |
commit | 90013b52c06611bbbffee6a314ede870bef4a5ab (patch) | |
tree | 5a93654a768700fc4e600306193dad51e11ae391 /main.go | |
parent | 45bc041389228e43d6845424131292e60934f424 (diff) |
Added a very simple server for heroku
Diffstat (limited to 'main.go')
-rw-r--r-- | main.go | 17 |
1 files changed, 17 insertions, 0 deletions
@@ -0,0 +1,17 @@ +package main + +import ( + "github.com/gin-gonic/gin" + "github.com/gin-gonic/contrib/static" + "os" +) + +func main() { + r := gin.New() + r.Use(gin.Logger()) + + r.Use(static.Serve("/", + static.LocalFile("./build", true))) + + r.Run(":" + os.Getenv("PORT")) +} |