mirror of
https://github.com/cyclotruc/gitingest.git
synced 2026-04-28 11:59:33 +00:00
26 lines
942 B
Python
26 lines
942 B
Python
"""Configuration for the server."""
|
|
|
|
from __future__ import annotations
|
|
|
|
from pathlib import Path
|
|
|
|
from fastapi.templating import Jinja2Templates
|
|
|
|
MAX_DISPLAY_SIZE: int = 300_000
|
|
|
|
# Slider configuration (if updated, update the logSliderToSize function in src/static/js/utils.js)
|
|
DEFAULT_FILE_SIZE_KB: int = 5 * 1024 # 5 mb
|
|
MAX_FILE_SIZE_KB: int = 100 * 1024 # 100 mb
|
|
|
|
EXAMPLE_REPOS: list[dict[str, str]] = [
|
|
{"name": "Gitingest", "url": "https://github.com/coderamp-labs/gitingest"},
|
|
{"name": "FastAPI", "url": "https://github.com/tiangolo/fastapi"},
|
|
{"name": "Flask", "url": "https://github.com/pallets/flask"},
|
|
{"name": "Excalidraw", "url": "https://github.com/excalidraw/excalidraw"},
|
|
{"name": "ApiAnalytics", "url": "https://github.com/tom-draper/api-analytics"},
|
|
]
|
|
|
|
|
|
# Use absolute path to templates directory
|
|
templates_dir = Path(__file__).parent / "templates"
|
|
templates = Jinja2Templates(directory=templates_dir)
|