Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 1 addition & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,9 @@ Create an environment file and add Postgres credentials etc
`cp .env.sample .env`

```bash
# Create and activate a virtual environment
python -m venv venv
source venv/bin/activate # Windows: venv\Scripts\activate

# Install dependencies
source venv/bin/activate
pip install -r requirements.txt

# Start development server
uvicorn app.main:app --reload
```

Expand Down
1 change: 1 addition & 0 deletions app/api/root.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ def root() -> dict:
"base_url": base_url,
"time": epoch,
"severity": "success",
"message": "Welcome to NX AI!"
}
endpoints = [
{"docs": "docs", "url": f"{base_url}/docs"},
Expand Down
13 changes: 13 additions & 0 deletions app/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@


from fastapi import FastAPI
from fastapi.middleware.cors import CORSMiddleware
from fastapi.staticfiles import StaticFiles
from fastapi.responses import FileResponse
import os
Expand All @@ -16,6 +17,18 @@
version=__version__,
)

# CORS middleware for development
app.add_middleware(
CORSMiddleware,
allow_origins=[
"http://localhost:1999",
"https://goldlabel.pro",
"https://soho.goldlabel.pro",
],
allow_credentials=True,
allow_methods=["*"],
allow_headers=["*"]
)

app.include_router(router)

Expand Down
Loading