diff options
| author | Tyler Hoang <tyler@tylerhoang.xyz> | 2026-05-19 01:39:13 -0700 |
|---|---|---|
| committer | Tyler Hoang <tyler@tylerhoang.xyz> | 2026-05-19 01:39:13 -0700 |
| commit | 0a40178b40b4c939b00f03f114777ffff2ed0652 (patch) | |
| tree | c646fe376400090f0dd88bd04023d61cce62a047 | |
| parent | b50c46d5bdbb1bd5e06a96a66b0696c1145ff4a9 (diff) | |
Fix production API base for ticker search
| -rw-r--r-- | frontend/lib/api.ts | 2 | ||||
| -rw-r--r-- | systemd/prismv2-frontend.service | 1 |
2 files changed, 1 insertions, 2 deletions
diff --git a/frontend/lib/api.ts b/frontend/lib/api.ts index b23edee..2c65ef2 100644 --- a/frontend/lib/api.ts +++ b/frontend/lib/api.ts @@ -1,6 +1,6 @@ import type { FinancialsResponse, HistoryPoint, MarketIndex, RatiosResponse, SearchResult, TickerOverview, ValuationResponse, WatchlistResponse } from "@/types/api"; -const API_BASE = process.env.NEXT_PUBLIC_API_BASE_URL || "http://localhost:8000"; +const API_BASE = (process.env.NEXT_PUBLIC_API_BASE_URL || "").trim().replace(/\/$/, ""); export class ApiError extends Error { status: number; diff --git a/systemd/prismv2-frontend.service b/systemd/prismv2-frontend.service index 8e71997..f50dd1e 100644 --- a/systemd/prismv2-frontend.service +++ b/systemd/prismv2-frontend.service @@ -7,7 +7,6 @@ Wants=prismv2-backend.service Type=simple User=tyler WorkingDirectory=/home/tyler/Work/prism-v2/frontend -Environment=NEXT_PUBLIC_API_BASE_URL=http://127.0.0.1:8001 Environment=NODE_ENV=development ExecStart=/usr/bin/npm run dev -- --hostname 127.0.0.1 --port 3001 Restart=on-failure |
