Shorty: The URL Shortener

by n2o

GitHub Readme.md

Shorty: The URL Shortener

button
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.

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 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/<your-short-link>;

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 Issues and assign yourself to the issue when you want wo work on it

  • Create Pull Requests

  • Read and follow the Code of Conduct