Skip to content

DiegoSantosWS/urlshortener

Repository files navigation

URL SHORTENER

System to shorten URL

CLONE

$ git clone git@github.com:DiegoSantosWS/urlshortener.git
$ cd urlshortener

PACKAGES

if your descktop does not have the packages it will have download them

$ go get -u github.com/gorilla/...

CONFIGURATION

create a MySQL database and enter user data and password

CONNECTIONS

$ go get -u github.com/go-sql-driver/... OR
$ go get -u github.com/go-sql-driver/mysql

AFTER MAKE A CONNECTION WITH DATABASE

Db, err = sqlx.Open("mysql", "user:pass@tcp(host:port)/dbname")

URL EXAMPLE

URL ORIGINAL: http://www.example.com.br

URL SHORTENER: http://localhost:3000/ADqF