Cleanup and README update
This commit is contained in:
+1
-1
@@ -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
|
||||
@@ -3,7 +3,7 @@
|
||||
Production-ready URL Shortener built with FastAPI, PostgreSQL, Docker, and Alembic.
|
||||
|
||||

|
||||

|
||||

|
||||

|
||||
|
||||
## 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
@@ -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
|
||||
|
||||
@@ -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)
|
||||
Reference in New Issue
Block a user