From ad67099a4b332f227705dc6842874469841b4cae Mon Sep 17 00:00:00 2001 From: MikunoNaka Date: Sun, 25 Apr 2021 16:49:32 +0530 Subject: added functionality to calculate the price after applying the discount on each product --- server/main.go | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'server/main.go') 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") } -- cgit v1.2.3