Golinks is a tiny url shortnet server that uses sqlite database. This is purely meant for my personal use and you are more than welcome to use it too.
First, you need to setup all your dependencies to compile this program. This project uses dep for dependency management.
$ go get -u github.com/golang/depNow you can clone the repo and download all the dependencies.
$ git clone https://github.com/maxking/golinks
$ cd golinks
$ dep ensure
$ go buildJust execute the binary to start the running server:
$ sudo PORT=80 ./golinksEnvironment variable PORT can be used to customize the port we are listening to.
I also add an entry in /etc/hosts to point go to IP address of the machine
running Golinks, so that you can use http://go/short in your browser to re-direct to
the URL you want to point to.