a url shortener made using go and redis
Alternatives To Kurz.go
Project NameStarsDownloadsRepos Using ThisPackages Using ThisMost Recent CommitTotal ReleasesLatest ReleaseOpen IssuesLicenseLanguage
Golang Url Shortener237
3 years agoApril 21, 202214mitGo
URL Shortener written in Golang using Bolt DB or Redis. Provides features such as Deletion, Expiration, OAuth and is of course Dockerizable.
5 months ago6mitGo
Your Own URL Shortener
6 months ago14May 04, 2021mitGo
Golang URL shortener and bookmarker service with UI, API, Cache, Hits Counter and forwarder using postgres and redis in backend, bulma in frontend
2 years agomitJavaScript
A file uploader + URL shortner written in node for your private cloud
6 years agoApril 06, 20121mitHTML
a url shortener made using go and redis
10 years agoMay 30, 20211Go
A URL shortener in Go with Redis as the backend
7 years agomitRuby
ready to go heroku hosted URL shortener based on guillotine
2 months ago84unlicenseScala
❱ 🐇 URL shortener service is written in Scala using Akka-Http and Redis ❰
7 months ago2mitElixir
URL shortener for http://s76.co
9 years agoMay 22, 2021bsd-3-clauseGo
A simple URL shortener written in Go programming language.
Alternatives To Kurz.go
Select To Compare

Alternative Project Comparisons

| |--.--.--.----.-----. .-----.-----. | <| | | |-- || _ | _ | ||||| |||__ || || by @fs111

kurz.go - a url shortener in go

kurz.go is my attempt to write a program that is actually useful in go. Right now it is in beta stage.

Right now it can shorten URLs, redirect and list the latest stored URLs. All urls are stored in a redis (http://redis.io) instance.

Compiling kurz.go

Next to having a full install of go itself, kurz.go requires gorilla.mux, godis and simpleconfig to be installed. For installing go itself, please follow the fine instructions at http://golang.org

For installing gorilla/mux do:

$ go get github.com/gorilla/mux

for installing godis do:

$ go get github.com/simonz05/godis/redis

for installing simpleconfig do:

$ go get github.com/fs111/simpleconfig

Note: These modules will be installed into your $GOROOT, so make sure it is writable. Alternatively you can set $GOPATH and they will be installed there instead.

Once the dependecies are installed, check out kurz.go: $ git clone https://github.com/fs111/kurz.go $ cd kurz.go $ make $ cd target $ usr/bin/kurz etc/kurz/kurz.conf #assumes that redis is up and running

In order to shorten a url POST it to http://localhost:9999/shorten/ with the parameter url set to the long url. In return, you will get a json document containing the long and the short url. If you open the shortened URL, "kurz" will do the expected thing an redirect you to the original URL. All functionality is shown below:

store a URL

$ curl -L http://localhost:9999/shorten/ --data-urlencode "url=https://github.com/fs111/kurz.go"


open a URL

$ curl -L http://localhost:9999/eIi

Redirecting to: http://github.com/fs111/kurz.go

show information about a url

$ curl http://localhost:9999/eIi+ # notice the bit.ly style + in the end


list latest URLs

$ curl http://localhost:9999/latest/1 { "urls" : [{"Key":"eIi","ShortUrl":"http://localhost:9999/eIi","LongUrl":"http://github.com/fs111/kurz.go","CreationDate":1321486517214982000,"Clicks":0}] }

All urls are stored in redis and if you set it up so, that it persists data to disk, the state can be kept forever. Since there is no real state within kurz.go, you could run multiple instances of it, but I have not tried it yet.


The amazing @vormplus made a great looking frontend for kurz.go, which you can see, if you visit http://localhost:9999/index.htm. If you want to reload the latest urls on that page, just press "." and the table will be refreshed.

Testing it out

The 'stuff' directory contains a shell-script that imports a csv file into kurz.go. Just try it out!

Note: The csv file might contain some NSFW urls, I found it on the interwebs somewhere. You have been warned.

Have fun with it!

-- @fs111

Popular Redis Projects
Popular Url Shortener Projects
Popular Data Storage Categories

Get A Weekly Email With Trending Projects For These Categories
No Spam. Unsubscribe easily at any time.
Url Shortener