Table of Contents
In this repo, I developed an application with desired technologies. It is basically 4 basic math operation calculator.
Features:
- API/Service/Repository Layer
- 4 basic math operation support and default method calculated 4 operations at the same time
- You should implement DRY principles to the rest of your life 😄
This section contains list major frameworks/libraries used to bootstrap the project.
After you clone this repository, you will find here required and useful commands.
Before starting to use the app or build, we need to install go mod.
- go.mod
make install
- .env file = After executing install command, you will have .env file in your folder. You can set there a few variables such as:
SERVER_PORT=8000 SERVER_HOST=localhost
After development or to use this application directly we need to build Server and Client application
- Build Server
make build-server
- Build Client
make build-client
- Start server
./bin/server
- Send Request to Server via Client - 5 Different options we have
./bin/client -method add -a 20 -b 20
./bin/client -method sub -a 50 -b 20
./bin/client -method div -a 10 -b 2
./bin/client -method multi -a 50 -b 20
./bin/client -method all -a 20 -b 10
- Addition
- Subtraction
- Multiplication
- Division
- All calculation in an api
- Build and manage bins with Makefile
- Mockery and Testify
Mehmet Canhoroz - @mehmetcanhoroz