A simple static web app that fetches Park & Ride availability from the City of Warsaw API and shows free spaces for each parking location.
-
Copy
config.example.jstoconfig.jsand put your API key there:// config.js window.WARSAW_API_KEY = "YOUR_API_KEY";
-
Open
index.htmlin a browser. The app fetches data on load.
index.html– main pagestyles.css– minimal stylingapp.js– fetch + render logicconfig.example.js– template for API keyconfig.js– your local API key (ignored by git)
- The API endpoint used:
https://api.um.warszawa.pl/api/action/parking_get_list/?apikey=... - If CORS is restricted by the API, you may need to open via a simple local server (to avoid
file://issues) or use a proxy. A quick local server:- Python 3:
python -m http.server 5173 - Node:
npx http-server -p 5173
- Python 3:
Open http://localhost:5173/ and verify data loads.