Giter VIP home page Giter VIP logo

ocelot-compose's Introduction

Ocelot

High Level Diagram

This section showcases basic usage of Ocelot as API Gateway.

Why Ocelot

Ocelot is a pluggable API gateway that you can install on top of ASP.net core projects. DIY gateways generally offer the following benefits:

  • Open-source and free of charge
  • Good for existing on-premise deployments without modifications to ecosystem
  • Can easily be propagated to cloud environments (Low migration cost)

Pre-requisites

  • Docker
  • Docker Compose
  • Postman (Optional for testing)

Running Demo

Run the following shell command to boot up this demo

# Windows Users and Root Linux Users
docker-compose up -d

# Non-root Linux Users
sudo docker-compose up -d

Importing Postman Payload

You can utilize the postman payload found on the root of this folder to test both downstream and gateway endpoints.

Testing Dowstream APIs using CURL

To retrieve from downstream endpoints:

# Dowstream Product List
curl -i GET http://localhost:52790/api/products/list

# Dowstream User List
curl -i GET http://localhost:52791/api/users/list

# Dowstream Transaction List
curl -i GET http://localhost:52792/api/transactions/list

Testing Gateway APIs using CURL

To retrieve from gateway endpoints:

# Gateway Product List
curl -i GET http://localhost:52793/api/products

# Gateway User List
curl -i GET http://localhost:52793/api/users

# Gateway Transaction List
curl -i GET http://localhost:52793/api/transactions

ocelot-compose's People

Contributors

allanchua101 avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.