Skip to content

Commit

Permalink
added readme
Browse files Browse the repository at this point in the history
  • Loading branch information
hennedo committed Mar 18, 2020
1 parent 889b0a7 commit 4b87b25
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions Readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
A simple URL Shortener
======================

This is the code for the url shortener running at https://dre.li - it supports emoji urls 💁‍♂️

## Requirements

* A running MongoDB server

## Config

The following config flags can be used:
| Flag | Environment Variable | Default | Description |
|------------------|----------------------|---------------------------|----------------------------------|
| --mongodb | MONGODB | "localhost/url-shortener" | MongoDB Connection String |
| --port | PORT | 8000 | Port on which the server listens |
| --admin-password | ADMIN_PASSWORD | foobar2342 | Password for the /admin endpoint |
| --base-url | BASE_URL | "http://localhost:8000" | Base URL for shorturls |

## Docker

Dockerfile is enclosed, a premade container will be available soon

## Shorten URLs!

Do it either with the Webinterface located at the root, or

* POST / with x-www-form-urlencoded value "url" set
* POST / with query parameter ?url=

Also there is a second parameter, "emoji" if you set this to "1", it will create a shorturl using emojis

It is compatible with Software like dropshare

0 comments on commit 4b87b25

Please sign in to comment.