url-shortener icon indicating copy to clipboard operation
url-shortener copied to clipboard

Shorty: The URL Shortener

= Shorty: The URL Shortener :experimental: :icons: font :icon-set: octicon :source-highlighter: rouge ifdef::env-github[] :tip-caption: :bulb: :note-caption: :information_source: :important-caption: :heavy_exclamation_mark: :caution-caption: :fire: :warning-caption: :warning: endif::[]

image::https://www.herokucdn.com/deploy/button.svg[link="https://heroku.com/deploy?template=https://github.com/n2o/url-shortener">"] image::https://img.shields.io/docker/pulls/cmeter/url-shortener[link="https://hub.docker.com/repository/docker/cmeter/url-shortener"]

This is a URL Shortener written in Java with the only purpose to create shortened urls, which are stored in a Redis-Database. The shortened links can then be used to provide a simpler access to complicated URLs.

image::img/shorty.png[shorty]

It comes with authentication support. Only admins are allowed to create or delete short links.

== Installation

You need a JDK and Gradle for this project.

As a requirement a Redis-Database is necessary. Start one with

docker run -p 6379:6379 redis:alpine

Then start the application:

gradle bootRun

== Usage

Open the landing page http://localhost:8080. You now need to login as an admin. The credentials are defined in the link:src/main/resources/application.properties[application.properties].

In the admin menu you can add new short links.

Then you can get redirected by querying the following address: http://localhost:8080/

== Docker

We automatically build a docker image for shorty. Find it here: https://hub.docker.com/repository/docker/cmeter/url-shortener

== Deployment

There is a docker-compose.yml file to create a production build. Please copy and edit skeleton.env to your needs and save it as production.env

The application then starts a redis server, which persists the data and exposes port 8080 for further access.

== Contribution

  • Write in English language
  • Add https://github.com/n2o/url-shortener/issues[Issues] and assign yourself to the issue when you want wo work on it
  • Create https://github.com/n2o/url-shortener/pulls[Pull Requests]
  • Read and follow the Code of Conduct