Description
This is a simple URL shortener service. It is written in Golang and uses Redis as database. Other hand, it also provides some services such as QR code generator, barcode generator, etc.
Preview
What's new
- Shorten URL
- Redirect to original URL
- Expiration time
- Statistics
- Rate limit
- QR code generator (custom color, download image)
- Barcode generator
- Microservices Dockerize
- Auto build and deploy image
- Reverse proxy
- Unit test
- Caching
Architecture
Getting started
- Clone this repo
git clone https://github.com/thuongtruong1009/short1url.git
- Fill in environment variables
# client
cd api && cp .env.example .env
# server
cd client && cp .env.example .env
- Run Docker container
docker-compose up -d
- Testing API
# with browser
Open http://localhost:81/s
# with Postman or browser
POST http://localhost:81/s
body: {
"url": "<your_original_url>"
}
# with curl
curl -X POST 'http://localhost:81/s'
-H 'Content-Type: application/json'
-d '{"url": "<your_original_url>"}"
Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change. If you like my work, please star π this repository.
License
Short1url is an MIT-licensed open source project.
Copyright of thuongtruong1009