| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
A simple URL shortener service built with FastAPI.
git clone cd url-shortener
python -m venv venv source venv/bin/activate # Linux/Mac venv\Scripts\activate # Windows
pip install -r requirements.txt
uvicorn app.main:app --reload
Server will start at: http://localhost:8000
curl -X POST "http://localhost:8000/shorten"
-H "Content-Type: application/json"
-d '{"url":"https://www.google.com"}'
Response: { "short_url": "http://localhost:8000/Ab3xYz" }
Open in browser: http://localhost:8000/Ab3xYz
curl http://localhost:8000/stats/Ab3xYz
Response: { "original_url": "https://www.google.com", "clicks": 3 }
| Back | FazBrowse Home | New Git URL |