basic structure setup
This commit is contained in:
parent
0ba46dad75
commit
95f8488227
9 changed files with 200 additions and 2 deletions
30
rag-chat-backend/src/app.py
Normal file
30
rag-chat-backend/src/app.py
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
"""FastAPI Backend"""
|
||||
|
||||
import uvicorn
|
||||
import os
|
||||
|
||||
from fastapi import FastAPI
|
||||
from fastapi.middleware.cors import CORSMiddleware
|
||||
from dotenv import load_dotenv
|
||||
|
||||
from core.config import settings
|
||||
|
||||
load_dotenv()
|
||||
app = FastAPI()
|
||||
|
||||
app.add_middleware(
|
||||
CORSMiddleware,
|
||||
allow_origins=["*"],
|
||||
allow_credentials=True,
|
||||
allow_methods=["*"],
|
||||
allow_headers=["*"],
|
||||
)
|
||||
|
||||
print('OPENSEARCH_USE_SSL')
|
||||
print(os.getenv('OPENSEARCH_USE_SSL'))
|
||||
print('settings.API_V1_STR')
|
||||
print(settings.API_V1_STR)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
uvicorn.run("app:app", host="0.0.0.0", port=8000, reload=True)
|
||||
Loading…
Add table
Add a link
Reference in a new issue