E-commerce REST API with Go & PostgresSQL. Uses Gin framework , Wire for dependency injection, Viper for handling environment variables, GORM as ORM and Swagger for API documentation.
- Go
- PostgreSQL
- Gin
- Wire
- Viper
- GORM
- go-swagger
Describe the purpose of the project, what it does, and what problem it solves.
Clone the repo
git clone https://github.com/amalmadhu06/project-laptop-store-clean-arch
cd project-laptop-store-clean-arch
Install required packages
go mod tidy
Setup Environment Variables
DB_HOST = replace with hostname
DB_NAME = replace with db name
DB_USER = replace with db username
DB_PORT = replace with db port
DB_PASSWORD = repalce with db password
TWILIO_ACCOUNT_SID = replace with your twilio account sid
TWILIO_AUTHTOKEN = replaec with twilio auth token
TWILIO_SERVICES_ID = replace with twilio services id
Compile and run
make run
Open any browser and access following link
http://localhost:3000/swagger/index.html#/
This project follows clean architecture.