1
Watch
1
Star
0
Fork
0
Issue

SHORTEN URL USING GO

DiegoSantosWS
DiegoSantosWS
pushedAt 3 years ago

DiegoSantosWS/urlshortener

URL SHORTENER

System to shorten URL

CLONE

$ git clone [email protected]: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:[email protected](host:port)/dbname")

URL EXAMPLE

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

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

ucloud ads