https://github.com/maxking/golinks
URL shortner writtne in Golang.
https://github.com/maxking/golinks
gin-gonic golang gorm-orm url-shortener
Last synced: 9 months ago
JSON representation
URL shortner writtne in Golang.
- Host: GitHub
- URL: https://github.com/maxking/golinks
- Owner: maxking
- License: apache-2.0
- Created: 2018-04-08T03:08:39.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2018-05-10T02:46:09.000Z (almost 8 years ago)
- Last Synced: 2025-07-03T22:07:31.004Z (9 months ago)
- Topics: gin-gonic, golang, gorm-orm, url-shortener
- Language: Go
- Size: 19.5 KB
- Stars: 1
- Watchers: 2
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Golinks
=======
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.
Build
=====
First, you need to setup all your dependencies to compile this program. This project
uses [dep](https://github.com/golang/dep) for dependency management.
```bash
$ go get -u github.com/golang/dep
```
Now you can clone the repo and download all the dependencies.
```bash
$ git clone https://github.com/maxking/golinks
$ cd golinks
$ dep ensure
$ go build
```
Running
=======
Just execute the binary to start the running server:
```bash
$ sudo PORT=80 ./golinks
```
Environment 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.