That project is responsible for authenticate users and manage currency conversions between authenticated users currency wallets.
To build the project as an executable file you can simply run the following make command;
make buildor you can build the project as docker image with the following command;
docker build -t ${docker_username}/${registry_name}:${image_tag}Before you test the application you need to generate needed mocks by executing following make command;
make generate-mocksAfter you generate mocks, you can simply run following make command to run all tests;
make unit-testsBefore you run the project, you need to stand the database up. You can simply use the following docker-compose command;
docker-compose up -dAfter you stand up the database, you can either run the project as docker container or an executable file.
To run the project as executable file, you can use following make command combinations;
make build
make runto first build then run. Or directly use following make command to build and run;
make startTo run the project as docker container, you can use following docker commands;
docker build -t ${docker_username}/${registry_name}:${image_tag}
docker run -p ${host_port}:4001 ${docker_username}/${registry_name}:${image_tag}You can use following make command to get rid of unnecessary files generated during build or test.
make cleanI wrote special seed commands both supports drop all tables from database by following make command;
make drop-tablesand creating all tables on database with static and example data
make migrate-tablesYou can see the swagger documentation of current endpoints after
you start the application in the route;
/swagger/index.html
I use default golangci-lint linter specifications for linting. You can use the following make command to check any lint issues;
make linter