Skip to content

Latest commit

 

History

History
32 lines (23 loc) · 852 Bytes

README.md

File metadata and controls

32 lines (23 loc) · 852 Bytes

What's this?

A sample implementation of micro services written in Go with Protocal Buffer, gRPC and grpc-gateway.

alt text

inspired by https://github.com/tinrab/spidey

Execute following commands to build up services

$ dep init
$ docker-compose up --build gateway

open localhost:8000 in your browser.

HTTP endpoints

Items

  • GET: /item/{id}
  • POST: /item
    • e.g. $ curl -X POST localhost:8000/item -d '{"name": "glove", "price": 3000}'

Users

  • GET: /user/{id}
  • POST: /user
    • e.g. $ curl -X POST localhost:8000/user -d '{"name": "conor"}'

Coordinates

  • GET: /item/{itemId}/coordinates
  • POST: /coordinate
    • e.g. $ curl -X POST localhost:8000/coordinate -d '{"userId": 1, "itemIds": [2,3,4]}'