https://github.com/cemutku/api-gateway-example
Ocelot Api Gateway Example
https://github.com/cemutku/api-gateway-example
api-gateway ocelotsample
Last synced: about 1 year ago
JSON representation
Ocelot Api Gateway Example
- Host: GitHub
- URL: https://github.com/cemutku/api-gateway-example
- Owner: cemutku
- Created: 2020-05-09T12:02:03.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2020-05-09T17:21:19.000Z (about 6 years ago)
- Last Synced: 2025-02-14T23:51:30.143Z (over 1 year ago)
- Topics: api-gateway, ocelotsample
- Language: C#
- Size: 7.81 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Ocelot Api Gateway Example
This project is an example of Ocelot API Gateway implementation. It takes requests (API calls) and routes them to the microservices (BasketAPI and ProductAPI). Thanks to API Gateway our application has a single entrypoint.
## Development
Run all projects separately with `dotnet run` command on its own project directory.
- Basket API -> http://localhost:5006/api/basket
- Product API -> http://localhost:5005/api/product
- Ocelot ApiGateway -> http://localhost:5000/
Now we have three application running on above given ports. We'll access these applications via Api Gateway (localhost:5000). These routes are defined in "ocelot.json" file in the OcelotApiGateway project. We can access our services llike below:
- http://localhost:5000/test/product
- http://localhost:5000/test/product/7
- http://localhost:5000/test/basket
- http://localhost:5000/test/basket/7