user-microservice is a set of API to manage users.
This project is written in GO, it store data in dynamodb.
You can build the project by using the command
make build
After that you can run the project by using (please configure you own env variables) :
export GIN_MODE: debug \
&& export APP_PORT: 8080 \
&& export RUNNING_MODE: api \
&& export DYNAMODB_ENDPOINT:http://localhost:9000 \
&& export AWS_REGION: eu-west-1 \
&& export DYNAMODB_TABLE_NAME: user \
&& ./user-microservice
Run dynamodb-local on docker
docker run -d -p 9000:8000 amazon/dynamodb-local
Create a dynamodb table (you need AWS cli)
aws dynamodb create-table --table-name user \
--attribute-definitions \
AttributeName=id,AttributeType=S \
--key-schema AttributeName=id,KeyType=HASH \
--provisioned-throughput ReadCapacityUnits=1,WriteCapacityUnits=1 \
--endpoint-url http://localhost:9000
Swagger is configure in the app you can access to the APIs to the URL : http://localhost:8080/swagger/index.html