arkanjoms / go-multitenancy

Basic multitenancy example using go with Postgres.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

go-multitenancy

Basic multitenancy example using go with Postgres.

Run app

clone repository and exec command:

$ docker-compose -f docker/docker-compose.yml up -d --build

running example

Creating todo for tenant1

$ curl --request POST \
    --url http://localhost:8080/go-multitenancy/tenant1/todos \
    --header 'content-type: application/json' \
    --data '{
  	"description": "Todo 1"
  }'
$ 

Retrieving todos for tenant1

$ curl --request GET \
  --url http://localhost:8080/go-multitenancy/tenant1/todos

Retrieving todos for tenant2

$ curl --request GET \
  --url http://localhost:8080/go-multitenancy/tenant2/todos

About

Basic multitenancy example using go with Postgres.

License:MIT License


Languages

Language:Go 87.8%Language:Dockerfile 6.6%Language:Shell 5.7%