tinyurl: a url shorten service
Clone or download
Latest commit 377fe33 Apr 8, 2018

README.md

TinyURL

Build Status Go Report Card GoDoc


Live Demo

a url shorten web service written by Golang, Vue and Gin.

Requisites

Quick Start

  1. clone project to GOPATH
git clone https://github.com/adolphlwq/tinyurl.git $GOPATH/src/github.com/adolphlwq/tinyurl
  1. sync golang packages
govendor sync
  1. build binary
make
  1. run binary
./tinyurl -dbname tinyurl -user user -pass pass -dbport 2306

TODOs

  • validate input url format
  • improve random generate string algorithm
    • use math/rand.Read instead math/rand.Intn func
  • use logrus replace golang log lib
  • reserch wrk
  • add test case
  • dynamic adjust short path length (default is 4)
  • count each url parse time (high concurrent situation)
  • qrcode support
  • list api

Reference