frank0957 commited on
Commit
4eec969
Β·
verified Β·
1 Parent(s): 6f6301d

Update startup.sh

Browse files
Files changed (1) hide show
  1. startup.sh +8 -0
startup.sh CHANGED
@@ -60,5 +60,13 @@ bash backup.sh &
60
  # ── Optional debug: uncomment the next line to check FMP_API_KEY length ──
61
  # python -c "import os; print('FMP key length:', len(os.getenv('FMP_API_KEY','')))"
62
 
 
 
 
 
 
 
 
 
63
  echo "Starting Web UI on port ${PORT:-7860}..."
64
  exec uvicorn web_ui:app --host 0.0.0.0 --port ${PORT:-7860}
 
60
  # ── Optional debug: uncomment the next line to check FMP_API_KEY length ──
61
  # python -c "import os; print('FMP key length:', len(os.getenv('FMP_API_KEY','')))"
62
 
63
+ python -c "import urllib.request, json, os; \
64
+ key=os.getenv('ALPHA_VANTAGE_KEY'); \
65
+ url=f'https://www.alphavantage.co/query?function=ECONOMIC_INDICATOR&apikey={key}'; \
66
+ print(url); \
67
+ r=urllib.request.urlopen(url, timeout=20); \
68
+ data=json.loads(r.read()); \
69
+ print(data.keys() if isinstance(data, dict) else type(data))"
70
+
71
  echo "Starting Web UI on port ${PORT:-7860}..."
72
  exec uvicorn web_ui:app --host 0.0.0.0 --port ${PORT:-7860}