News CRUD API
This repository is CRUD API for news management applying the clean code with three layer of handler, service, and repository. Created using GO, using redis for caching, pure sql library (no ORM) and docker for containerizing.
Relation
Features
This service come into two endpoint
/api/v1/articles/
for articles related
/api/v1/authors/
for authors related
some of them containing extra query parameters and all of the documentation could be found in the doc
folder. Documentation created using postman collection so import it to your local postman and start using it~
Technologies Used
- Go
- Docker
- Redis
- Postgresql
- go-migrate
- air
- cobra-cmd
How to run
- Install all dependencies listed above
- Create .env from .env.example and fill it up
- Run the docker container using
docker-compose up -d
to run on the background or docker-compose up --build
to run in the CLI - run
- to run the server
air server
for hot reloading after updatego run main.go server