Skip to content

alpayOnal/golang-microservice-apps

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sample Golang Microservices with Kafka and Mongodb

Sample Golang Microservices

Micro app : request to kafka

Micro app k2m : kafka to mongodb

Flow



Requirements

  • Docker

Installation

cd micro_app
docker-compose up -d 

cd micro_app_k2m 
docker-compose up -d

Usage

API Resources

POST /items

Example: http://localhost:8000/items

Request body:

{
    "title": "item title",
    "description":"item description",
    "company":"item company",
    "price":1240,
    "currency":"EUR"
}

GET /items

Example: http://localhost:8000/items

Response body:

[
    {
        "_id": "5e329bd8b01422d7e0936ffa",
        "title": "item title ",
        "description": "item description ",
        "company": "item company",
        "price": 1240,
        "currency": "EUR",
        "createdAt": "2020-01-30T09:03:20.707Z"
    }
]

GET /items/[id]

Example: http://localhost:8000/items/5e329bd8b01422d7e0936ffa

Response body:

{
    "_id": "5e329bd8b01422d7e0936ffa",
    "title": "item title ",
    "description": "item description",
    "company": "item company",
    "price": 1240,
    "currency": "EUR",
    "createdAt": "2020-01-30T09:03:20.707Z"
}

About

sample go microservice apps

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published