Restraunt Service

Packages used
- go-chi - Router used instead of default one
- sqlx - Provides useful options on top of standard database/sql package
- go-chi render -The render package helps manage HTTP request / response payloads.
- gotenv - Loading variable from .env
How to run this project
Note: Before running this project you need to install docker and docker-compose in your system. As this project relies on docker to run mysql database.
Change the dockerfile name in docker-compose.yaml in dockerfile path.
Note: For development use devapi.Dockerfile for production use api.Dockerfile
Then run the command
docker-compose up -d
Docker will download the required images and run the containers.
check the api docs
This project uses swaggerui for api documentation, Navigate to http://localhost:8080/swaggerui/
How db migration works
This project uses golang-migrate directly inside docker so at the time of initailly running the project for very first time the migrate tool will directly create the required tables inside the db.