MA
URL Shortener
This is a Spring Boot application for URL shortening. It allows users to submit long URLs and receive a shortened version for easy sharing.
Technologies Used
- Spring Boot
- PostgreSQL
Setup
Prerequisites
- Java Development Kit (JDK) 17 or later
- Maven
- Docker
Building and Running with Maven
-
Clone the repository:
git clone https://github.com/manishdait/url-shortner
-
Navigate to the project directory:
cd url-shortener -
Setup Postgres Container:
docker compose up -d
-
Run SpringBoot application:
mvn spring-boot:run
Usage
Accessing UI
Once the application is running, the user interface is accessible at:
http://localhost:8080/url-shortner
Shortening URLs
- Open the URL in your web browser (
http://localhost:8080/url-shortner). - Enter the long URL you want to shorten in the provided input field.
- Click the "Shorten URL" button.
- The application will generate a shortened URL and display it on the page.
- If the entered URL is invalid, an appropriate error message will be shown.
- Visiting a shortened URL will redirect you to the original long URL

