Skip to content

ASJordi/url-shortener-java

Repository files navigation

URL Shortener with Java and Jakarta EE

About 💻

URL Shortener is a web application that allows you to shorten URLs with a custom alias. To do this, it uses MySQL to store the URLs and the aliases. Implements a AUTH_CODE to protect the creation of new URLs. The application is developed with Java and Jakarta EE. Implements JDBC and JPA to interact with the database. The application is deployed on a VPS using Docker.

app01

app01

Demo 🎥

demo.mp4

Stack 🛠️

  • Java SE
  • Jakarta EE
  • JPA - Hibernate
  • JDBC
  • JSP
  • JSTL
  • CDI
  • Tomcat
  • MySQL
  • CSS
  • Water.css

Installation ⚙️

You can run the application in a Docker container or in your local environment.

If you don't want to build the application, you can download the Docker image from the Packages section

Docker 🐳

  • Build the Docker image

    docker build -t todo-app .
  • Run the Docker container

      docker container run -p 8080:8080 todo-app
  • Use docker-compose to run the application with MySQL and PhpMyAdmin

    docker compose up -d

Make sure to create the database with the script in src/main/resources/db/db.sql before running the application.

Local 💻

  • Clone the repository

    git@github.com:ASJordi/url-shortener-java.git
  • Create a MySQL database with the script in src/main/resources/db/db.sql

  • Configure the database connection in src/main/webapp/META-INF/context.xml

  • Install dependencies with Maven

  • Configure tomcat to use the MySQL connector

  • Run the application with:

    mvn tomcat7:redeploy

License 📄

Distributed under the MIT License. See LICENSE for more information.

Contact 📧

Jordi Ayala - @ASJordi

Project Link: https://github.com/ASJordi/url-shortener-java

Releases

No releases published

Packages