orifjon9 / ApiGateway

Ocelot Api Gateway with ASP.NET Core 2.x, Microservices .NET Core

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

CatalogApi - 7001

OrdersApi - 7002

GatewayApi - 7000

ApiGatewayExample
----> CatalogApi
----> OrderApi
----> GatewayApi

Configure Ocelot
add nuget package anf that called 'Ocelot' and add it to GatewayApi project
configure
- add ocelot.json
changes in Startup and Programm files
links to ocelot docs http://threemammals.com/ocelot
- add rules

http://localhost:7000/catalog-api/currencies ======> http://localhost:7001/api/currencies
http://localhost:7000/orders-api/orders ======> http://localhost:7002/api/orders

Docker

Build

Use docker-compose build command for build apps

Run

Use docker-compose up command for run apps

http://localhost:7000/catalog-api/currencies ======> http://catalog.api/api/currencies
http://localhost:7000/orders-api/orders ======> http://orders.api/api/orders

About

Ocelot Api Gateway with ASP.NET Core 2.x, Microservices .NET Core


Languages

Language:C# 83.7%Language:Dockerfile 16.3%