All Projects → system76 → Beebee

system76 / Beebee

Licence: mit
URL shortener for http://s76.co

Programming Languages

elixir
2628 projects

BeeBee

BB-8

Requirements

BeeBee requires Elixir >= 1.2 and Redis >= 3.0.

Setup

  1. run mix deps.get
  2. run mix conform.configure
  3. edit the generated config/beebee.conf with your redis credentials
  4. run mix run --no-halt
  5. enjoy!

Usage

BeeBee exposes two API endpoints, POST /_add and GET /_stats.

POST /_add

Accepts:

{
  "url": "https://github.com", // URL to be shortened
  "short_tag": "github" // OPTIONAL short tag
}

If a short tag is omitted, one will be randomly generated for you.

Returns:

{
  "short_tag": "github" // Short tag now mapped to the provided URL
}

GET /_stats

Returns:

[
  {
    "short_tag": "github",
    "url": "https://github.com",
    "count": 0
  },
  // ...
]

Any other route will try and find a matching short tag, increment the count, and return a 301 to the provided URL.

A 404 with an empty body will be returned for missing short tags

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].