https://github.com/navaneethkrishna11/url_shortner
Project Made With: Python 3.12 | FastAPI 0.104.0 | Pydantic 2.4.2 | Uvicorn 0.24.0 | Docker
https://github.com/navaneethkrishna11/url_shortner
docker-compose python3
Last synced: 22 days ago
JSON representation
Project Made With: Python 3.12 | FastAPI 0.104.0 | Pydantic 2.4.2 | Uvicorn 0.24.0 | Docker
- Host: GitHub
- URL: https://github.com/navaneethkrishna11/url_shortner
- Owner: navaneethkrishna11
- Created: 2025-08-14T06:49:38.000Z (11 months ago)
- Default Branch: main
- Last Pushed: 2025-08-14T08:30:02.000Z (11 months ago)
- Last Synced: 2025-08-14T09:23:45.579Z (11 months ago)
- Topics: docker-compose, python3
- Language: Python
- Homepage: https://url-shortner-m5m1.onrender.com/
- Size: 17.6 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# URL Shortener
A simple and lightweight URL shortener built with **FastAPI**.
Supports Docker deployment or manual local running.
---
## 📦 Prerequisites
Before running, make sure you have:
- [Python 3.10+](https://www.python.org/downloads/)
- [Docker](https://docs.docker.com/get-docker/)
- [Git](https://git-scm.com/)
---
## 🚀 Running with Docker (Recommended)
1. **Clone the repository**
```bash
git clone https://github.com/your-username/url-shortener.git
cd url-shortener
2. **Build and start the container**
```bash
docker build -t url-shortener .
docker run -d -p 8000:8000 url-shortener
If using docker-compose
docker compose up --build -d
docker logs url-shorter-url-shortener-1
Running Locally (Manual)
Clone the repository
git clone https://github.com/your-username/url-shortener.git
cd url-shortener
Create & activate a virtual environment
python -m venv venv
source venv/bin/activate # Linux / macOS
venv\Scripts\activate # Windows
Install dependencies
pip install -r requirements.txt
Run the app
uvicorn app.main:app --reload --host 0.0.0.0 --port 8000
or if using run.py:
uvicorn run:app --reload --host 0.0.0.0 --port 8000
Open in browser
API Docs: http://localhost:8000/docs
Homepage: http://localhost:8000