- Clone source code
git clone https://github.com/SonLPH/at-test-assessments.git
- Create .env file if not exists in root directory:
cp .env.example .env
- Run docker to build database up
make docker-compose-dev-up
- Open 3 terminal for 3 services
go run services/bookingservice/main.go
go run services/pricingservice/main.go
go run services/sendservice/main.go
- Booking service host in localhost:4444, Pricing service host in localhost:4445 and Send service host in localhost:4446. So first thing first make a call to mock employee in database.
curl localhost:4446/mock
- Now use POSTMAN for using API. API in this repo I have provided:
-
POST API Create Booking - localhost:4444/booking
request example
{ "of_user_id" : "3", "booking_total" : "100", "booking_type" : "house" }
-
GET API Pricing - localhost:4445/pricing
request example { "day" : "2024-04-07", "employee_id" : "0" }