Skip to content

arkanjoms/go-multitenancy

Repository files navigation

go-multitenancy

Basic multitenancy with multi database example using go and 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

Releases

No releases published

Packages

No packages published