File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -14,14 +14,9 @@ Create an environment file and add Postgres credentials etc
1414` cp .env.sample .env `
1515
1616``` bash
17- # Create and activate a virtual environment
1817python -m venv venv
19- source venv/bin/activate # Windows: venv\Scripts\activate
20-
21- # Install dependencies
18+ source venv/bin/activate
2219pip install -r requirements.txt
23-
24- # Start development server
2520uvicorn app.main:app --reload
2621```
2722
Original file line number Diff line number Diff line change @@ -19,6 +19,7 @@ def root() -> dict:
1919 "base_url" : base_url ,
2020 "time" : epoch ,
2121 "severity" : "success" ,
22+ "message" : "Welcome to NX AI!"
2223 }
2324 endpoints = [
2425 {"docs" : "docs" , "url" : f"{ base_url } /docs" },
Original file line number Diff line number Diff line change 33
44
55from fastapi import FastAPI
6+ from fastapi .middleware .cors import CORSMiddleware
67from fastapi .staticfiles import StaticFiles
78from fastapi .responses import FileResponse
89import os
1617 version = __version__ ,
1718)
1819
20+ # CORS middleware for development
21+ app .add_middleware (
22+ CORSMiddleware ,
23+ allow_origins = [
24+ "http://localhost:1999" ,
25+ "https://goldlabel.pro" ,
26+ "https://soho.goldlabel.pro" ,
27+ ],
28+ allow_credentials = True ,
29+ allow_methods = ["*" ],
30+ allow_headers = ["*" ]
31+ )
1932
2033app .include_router (router )
2134
You can’t perform that action at this time.
0 commit comments