tinyurl

command module
v0.0.0-...-ef910b2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 16, 2020 License: BSD-3-Clause Imports: 6 Imported by: 0

README

TinyURL

Build Status Go Report Card GoDoc


Live Demo

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

Requisites

  • Golang(1.8+)
  • Govendor
  • MySQL/Sqlite3
  • make

Quick Start

  1. clone project to GOPATH
git clone https://github.com/tinyurl/tinyurl.git $GOPATH/src/github.com/tinyurl/tinyurl
  1. sync golang packages
govendor sync
  1. build binary
make
  1. change config in default.properties
# tinyurl dev config
#app
app.host=0.0.0.0
app.port=8877
app.domain=0.0.0.0:8877

# db config
db.type=sqlite3
db.path=.
db.host=
db.port=
db.name=tinyurldb
db.user=
db.password=
  1. run binary
./tinyurl -config default.properties
  1. open index.html in frontend/ with broswer

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
  • Backend
    • data type support multi database(index in sender)
    • adjust short path generating algorithm
    • API rate
    • Swagger for api management
    • Admin account?
    • count each url parse time (high concurrent situation)
    • custom short url
  • Frontend
    • qrcode support

Reference

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL