Skip to content

Commit

Permalink
Azure Repoints
Browse files Browse the repository at this point in the history
  • Loading branch information
josh-wjp committed Feb 8, 2025
1 parent 8aee55e commit 82ca128
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
20 changes: 10 additions & 10 deletions backend/main.py
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
from fastapi import FastAPI, HTTPException
#from fastapi.middleware.cors import CORSMiddleware //leave CORS code for dev testing, Azure manages in Prod
from fastapi.middleware.cors import CORSMiddleware //leave CORS code for dev testing, Azure manages in Prod
from backend.ai.strategy import make_trade_decision # Import your existing code

app = FastAPI()

#//leave CORS code for dev testing, Azure manages in Prod
# Configure CORS
# app.add_middleware(
# CORSMiddleware,
# allow_origins=["http://localhost:5173"], # Allow your frontend's origin
# allow_credentials=True,
# allow_methods=["*"],
# allow_headers=["*"],
#)
//leave CORS code for dev testing, Azure manages in Prod
Configure CORS
app.add_middleware(
CORSMiddleware,
allow_origins=["http://hodlbot.wjp.ai"], # Allow the frontend origin
allow_credentials=True,
allow_methods=["*"],
allow_headers=["*"],
)

COINGECKO_API = "https://api.coingecko.com/api/v3/simple/price"

Expand Down
2 changes: 1 addition & 1 deletion src/App.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ const App = () => {
setTradeDecision(null);

try {
const response = await fetch(`hodlbot-api-bmcmdhccf5hmgahy.eastus2-01.azurewebsites.net/${crypto}`);
const response = await fetch(`https://hodlbot-api-bmcmdhccf5hmgahy.eastus2-01.azurewebsites.net/${crypto}`);
if (!response.ok) {
throw new Error("Failed to fetch trade decision.");
}
Expand Down

0 comments on commit 82ca128

Please sign in to comment.