From 90013b52c06611bbbffee6a314ede870bef4a5ab Mon Sep 17 00:00:00 2001 From: MikunoNaka Date: Thu, 15 Jul 2021 16:40:24 +0530 Subject: Added a very simple server for heroku --- main.go | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 main.go (limited to 'main.go') diff --git a/main.go b/main.go new file mode 100644 index 0000000..c9d0e56 --- /dev/null +++ b/main.go @@ -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")) +} -- cgit v1.2.3