thuongtruong1009 / short1url

πŸ”— Ship your link in an easier way

Home Page:https://short1url.thuongtruong.me

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

logo SHORT1URL

Build status Test status CircleCI status Automated api build Automated client build GitHub code size in bytes License

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

Preview image

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

  1. Clone this repo
git clone https://github.com/thuongtruong1009/short1url.git
  1. Fill in environment variables
# client
cd api && cp .env.example .env

# server
cd client && cp .env.example .env
  1. Run Docker container
docker-compose up -d
  1. 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

About

πŸ”— Ship your link in an easier way

https://short1url.thuongtruong.me

License:MIT License


Languages

Language:Vue 55.7%Language:Go 26.1%Language:Dockerfile 7.0%Language:TypeScript 6.2%Language:SCSS 5.1%