Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/zefer/zurly

A simple URL shortener service
https://github.com/zefer/zurly

Last synced: 2 days ago
JSON representation

A simple URL shortener service

Awesome Lists containing this project

README

        

# zurly

A very simple URL shortening service.

Go + Redis.

Built to help me learn Go, so expect scaryness.

Deliberately using net/http rather than a web framework, in an attempt to learn.

# Short Urls

A unique ID is generated for each short URL. This ID is the hex value of the
total number of urls stored in Redis. This total is implemented as a simple
counter.

Path /:ID will redirect to the corresponding long url for the given ID.

# API

Here are the [API docs](http://zefer.github.io/zurly).

The API resources & methods are defined in [API.md](docs/API.md).

The html docs are generated by running `go run docs/exporter.go`. NB: You must
have [snowcrash](https://github.com/apiaryio/snowcrash) installed to parse
API.md.

# Build & Run

`go build` then `PORT=5000 zurly-server`

# Redis

Connects to `127.0.0.1:6379` by default. Override this by setting env vars
`REDIS_ADDRESS` & `REDIS_PASSWORD`.