This is a repository for URL shortener apis. It comes with most sensible plugins already installed:
- gin(Framework) for handling requests
- postgresql for relational database
- gorm (go-gorm/gorm) for ORM library for Golang aims to be developer friendly
- redis (redis/go-redis) for caching query
- rate limiter (internal\middleware\ratelimit) middleware for prevent too many requests
Create the default.yaml file by copy example.yaml file in deployments folder
Download dependencies
go mod download
Run server
make server
or
Run with docker
cd deployments
POSTGRES_PASSWORD=... REDIS_PASSWORD=... docker-compose up -d
Open Makefile for more details.
Distributed under the MIT License.