Add envoy proxy
This commit is contained in:
@ -60,9 +60,12 @@ func initRouter(dbConn *gorm.DB) *gin.Engine {
|
||||
gin.SetMode(gin.ReleaseMode)
|
||||
router := gin.Default()
|
||||
|
||||
router.GET("/ping", handlePing)
|
||||
router.GET("/", handleGetProducts(dbConn))
|
||||
router.GET("/:productId", handleGetProduct(dbConn))
|
||||
routes := router.Group("/products")
|
||||
{
|
||||
routes.GET("/ping", handlePing)
|
||||
routes.GET("", handleGetProducts(dbConn))
|
||||
routes.GET("/:productId", handleGetProduct(dbConn))
|
||||
}
|
||||
|
||||
return router
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user