fix(storm-intel): call IEM API directly from browser — no proxy needed
IEM geojson/sbw.geojson has CORS open to all origins so the browser can fetch it directly. Moves all transformation logic into useStormEvents.js, eliminating the need for vercel dev or any server-side proxy. Works with plain pnpm run dev on localhost. Falls back to MOCK_STORM_EVENTS if IEM is unreachable. api/storm-polygons.js kept as optional edge cache layer.
This commit is contained in:
+5
-2
@@ -1,6 +1,9 @@
|
||||
{
|
||||
"buildCommand": "pnpm build",
|
||||
"devCommand": "pnpm dev",
|
||||
"outputDirectory": "dist",
|
||||
"rewrites": [
|
||||
{ "source": "/api/(.*)", "destination": "/api/$1" },
|
||||
{ "source": "/(.*)", "destination": "/index.html" }
|
||||
{ "source": "/((?!api/).*)", "destination": "/index.html" }
|
||||
]
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user