Cleanup and README update

This commit is contained in:
2026-03-05 21:51:21 +02:00
parent fe2d81b6b8
commit c61d3228ef
4 changed files with 8 additions and 9 deletions
+1 -1
View File
@@ -1,3 +1,3 @@
DATABASE_URL=postgresql+psycopg2://postgres:postgres@localhost:5432/url_db
BASE_URL=http://localhost:8000
BASE_URL=http://localhost:9995
DEBUG=True
+4 -5
View File
@@ -3,7 +3,7 @@
Production-ready URL Shortener built with FastAPI, PostgreSQL, Docker, and Alembic.
![Tests](https://img.shields.io/badge/tests-passing-brightgreen)
![Coverage](https://img.shields.io/badge/coverage-90%25-brightgreen)
![Coverage](https://img.shields.io/badge/coverage-99%25-brightgreen)
![Python](https://img.shields.io/badge/python-3.12-blue)
## Techstack
@@ -12,7 +12,7 @@ FastAPI, PostgreSQL, SQLAlchemy 2.0, Alembic, Docker, Pytest and Pydantic v2
## Features
Shorten URLs, Redirect, Click tracking, Stats endpoint, Collision handling, 90%+ test coverage, Dockerized and Alembic migrations
Shorten URLs, Redirect, Click tracking, Stats endpoint, Collision handling, 99%+ test coverage, Dockerized and Alembic migrations
## Local Setup
@@ -22,10 +22,9 @@ python3 -m venv venv
source venv/bin/activate
```
Create .env:
Create .env, copy as this as template:
```
DATABASE_URL=sqlite:///./test.db
BASE_URL=http://localhost:8000
.env.example
```
Run:
+2 -2
View File
@@ -12,8 +12,8 @@ class Settings(BaseSettings):
# Server settings
host: str = "0.0.0.0"
port: int = 8000
base_url: str = "http://localhost:8000"
port: int = 9995
base_url: str = "http://localhost:9995"
# Debug flag
debug: bool = True
+1 -1
View File
@@ -11,6 +11,6 @@ def test_default_settings_values():
assert settings.app_name == "URL Shortener"
assert settings.host == "0.0.0.0"
assert settings.port == 8000
assert settings.port == 9995
assert settings.debug is True
assert isinstance(settings.allowed_hosts, list)