Giter Club home page Giter Club logo

integrator-ballerina's Introduction

Ballerina Integrator

This is part of the ddd-playground project.

The project consists of many dockerised services written in different languages and exposing APIs.

An integrator component written in Ballerina lang will expose transformed and combined data of those APIs.

Content

The application is the Integrator and it is written in Ballerina lang.

Base path of integrator is: http://localhost:9090

Product Endpoints

API Endpoints available are:

GET  "/product"
GET  "/product/{id}"
POST "/product"

In details

curl --location --request GET "http://localhost:9090/product"

{
   "data":[
      {
         "id":1,
         "name":"Red Chair",
         "categoryId":1
      },
      {
         "id":2,
         "name":"Blue Table",
         "categoryId":2
      },
      {
         "id":3,
         "name":"Yellow Carpet",
         "categoryId":3
      }
   ],
   "meta":{
      "count":3,
      "page":1,
      "pageSize":3
   }
}

Get specific product

curl --location --request GET 'http://localhost:9090/product/2'

{
   "id":2,
   "name":"Blue Table",
   "categoryId":2
}

Create a new product

curl --location --request POST 'http://localhost:9090/product' -d '{"name":"Yellow Chair", "category_id":1}'

{
 "id":4,
 "name":"Yellow Chair",
 "categoryId":1
}

Configuration

There is a ballerina.conf.dist available. Create a new ballerina.conf with your configuration preferences.

Start

make start

Stop

make stop

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.