aboutsummaryrefslogtreecommitdiff
path: root/server/main.go
diff options
context:
space:
mode:
authorMikunoNaka <bokuwakanojogahoshii@yahoo.com>2021-04-25 16:49:32 +0530
committerMikunoNaka <bokuwakanojogahoshii@yahoo.com>2021-04-25 16:49:32 +0530
commitad67099a4b332f227705dc6842874469841b4cae (patch)
tree7115e9953814f5536824355c98b0d999462a452d /server/main.go
parent93dd72920e5a72c684f53071f4ab1972bf1e878c (diff)
added functionality to calculate the price after applying the discount on each product
Diffstat (limited to 'server/main.go')
-rw-r--r--server/main.go10
1 files changed, 6 insertions, 4 deletions
diff --git a/server/main.go b/server/main.go
index b0d3f9d..9a84f7b 100644
--- a/server/main.go
+++ b/server/main.go
@@ -2,14 +2,16 @@ package main
import (
"github.com/gin-gonic/gin"
- // "net/http"
+ "github.com/gin-gonic/contrib/static"
)
func main() {
- myRouter := gin.New()
- // myRouter.Use(gin.Logger())
+ myRouter := gin.Default()
+ myRouter.Use(gin.Logger())
- myRouter.Static("/app", "./app")
+ // serve static front end on /
+ myRouter.Use(static.Serve("/",
+ static.LocalFile("./app", true)))
myRouter.Run(":8080")
}