Gohort is a simple URL shortener written in Go.
It provides a RESTful API to create and retrive short URL and their corresponding expanded forms.
Gohort requires a working Redis installation.
Once you have a working Redis installation, go get the project from Github.
go get github.com/aishraj/gohort
Now change into the project directory and run
Next run the executable connecting to a local Redis installation:
./gohort -cpus=1 -rhost="localhost" -rport=6379 -sport=8090 -timeout=10
In order to create a new short URL:
curl -X POST http://localhost:8080/api/v1/?base=www.google.com
In order to retrive the original URL from the shortend URL: