mirror of
https://github.com/xlorepdarkhelm/numinar-coding-project.git
synced 2026-09-08 19:03:12 -04:00
Got pre-commit hooks working, starting setup for FastAPI.
Signed-off-by: Cliff Hill <xlorep@darkhelm.org>
This commit is contained in:
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
.python-version
|
||||
3994
backend/poetry.lock
generated
3994
backend/poetry.lock
generated
File diff suppressed because it is too large
Load Diff
@@ -1,8 +1,25 @@
|
||||
from fastapi import FastAPI
|
||||
"""Main application startup for the Numinar coding project backend."""
|
||||
|
||||
app = FastAPI()
|
||||
from typing import Any
|
||||
|
||||
from fastapi import FastAPI
|
||||
from starlette.config import Config
|
||||
|
||||
|
||||
config = Config(".env")
|
||||
|
||||
ENVIRONMENT = config("ENVIRONMENT", default="development")
|
||||
SHOW_DOCS_ENVIRONMENTS = {"development", "staging"}
|
||||
|
||||
app_configs: dict[str, Any] = {"title": "Numinar Coding Project"}
|
||||
|
||||
if ENVIRONMENT not in SHOW_DOCS_ENVIRONMENTS:
|
||||
app_configs["openapi_url"] = None # Disable OpenAPI schema
|
||||
|
||||
app = FastAPI(**app_configs)
|
||||
|
||||
|
||||
@app.get("/")
|
||||
async def root():
|
||||
return {"message": "Welcome to the Numinar Coding Project Backend!"}
|
||||
"""Root endpoint to verify the service is running."""
|
||||
return {"message": "Welcome to the Numinar Coding Project Backend!"}
|
||||
|
||||
Reference in New Issue
Block a user