INNER CODE UNIT · Go

createShopMicroservice

ThreeDotsLabs/monolith-microservice-shop · cmd/microservices/shop/main.go:38

func createShopMicroservice() *chi.Mux {
	shopProductRepo := shop_infra_product.NewMemoryRepository()
	shopProductsService := shop_app.NewProductsService(shopProductRepo, shopProductRepo)

	if err := shop.LoadShopFixtures(shopProductsService); err != nil {
		panic(err)
	}

	r := cmd.CreateRouter()

	shop_interfaces_public_http.AddRoutes(r, shopProductRepo)
	shop_interfaces_private_http.AddRoutes(r, shopProductRepo)

	return r
}

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…