The URL Shortener App is a Python-based web application built with FastAPI. It allows users to shorten long URLs into easily shareable and memorable short links. The app supports OpenAPI documentation, and it can be easily deployed using Docker.
- Shorten long URLs into short links.
- Retrieve original URLs by using short links.
- OpenAPI documentation for easy API exploration.
- Docker support for seamless deployment.
-
Clone the repository:
git clone https://github.com/muhammadusama377/url-shortener.git
-
Navigate to the project directory:
cd url-shortener
-
Install dependencies:
pip install -r requirements.txt
-
Run Migrations:
alembic upgrade head
-
Run the FastAPI development server:
uvicorn main:app --reload
-
Access the application at http://localhost:8000 in your browser.
-
Use the OpenAPI documentation at http://localhost:8000/docs to explore the API and interact with endpoints.
The OpenAPI documentation provides details about the available endpoints, request/response formats, and example usage. Access the documentation at http://localhost:8000/docs when the app is running.
-
Build the Docker image:
docker-compose build
-
Run the Docker container:
docker-compose up
-
Access the application at http://localhost:8000 in your browser.
Contributions are welcome! Please follow our contribution guidelines to contribute to the project.