thomaspoignant / user-microservice

user-microservice is a set of API written in GO to manage user

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

USER microservice

Build Status Coverage Status FOSSA Status

user-microservice is a set of API to manage users.
This project is written in GO, it store data in dynamodb.

Start the project

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

If you want to use a local dynamodb

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

Use swagger

Swagger is configure in the app you can access to the APIs to the URL : http://localhost:8080/swagger/index.html

About

user-microservice is a set of API written in GO to manage user

License:Apache License 2.0


Languages

Language:Go 95.9%Language:Makefile 3.5%Language:Shell 0.6%