Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/zefer/zurly
- Owner: zefer
- Created: 2013-11-30T17:30:12.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2013-12-10T09:05:19.000Z (almost 11 years ago)
- Last Synced: 2024-04-13T23:29:52.176Z (7 months ago)
- Language: Go
- Homepage: http://zefer.github.io/zurly/
- Size: 137 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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`.