===========================
- Go SDK +1.6 (https://golang.org)
- GO ORM (https://github.com/jinzhu/gorm)
- Viper (https://github.com/spf13/viper)
- Gorilla Mux (https://github.com/gorilla/mux)
- Glide (https://github.com/Masterminds/glide)
- Memory : +- 50MB
- Storage : +- 10MB
- CPU : 1 Core
download Go SDK from https://golang.org/dl/
extract using command :
tar -C /usr/local -xzf go$VERSION.$OS-$ARCH.tar.gz
edit ``$HOME/.profile
or
./bashrc` using text editor.
add
export PATH=$PATH:/usr/local/go/bin
create folder workspace, inside folder workspace create below structure folder.
`> src
> pkg
> bin`
Set GOPATH value to path of our workspace folder.
export GOPATH=$PATH_TO_YOUR_FOLDER/workspace
test if go has successfully configured in system by run
go env
.
run ./glide install
$PATH/url-shortener/go build
$PATH/url-shortener/ ./url-shortener
Create / Shorten URL (POST)
http://[YOUR_HOST]:[YOUR_PORT]/shortener/create
Get shorten URL (GET)
http://[YOUR_HOST]:[YOUR_PORT]/shortener/{id}