Ravi Sir's Cards › AWS
Wire API, CORS and API_BASE
This revision card explains Wire API, CORS and API_BASE. It starts from the need that uI and API are different origins. One wrong URL breaks the demo. It describes HTTP API routes + CORS; set const API_BASE in app.js (no trailing slash). The how-to section notes GET/POST /notes, DELETE /notes/{id}; paste invoke URL into app.js. An example on the card is add note in UI , then Network 201 , then list refreshes.
Read card text
What this card says
Why do we need it?
UI and API are different origins. One wrong URL breaks the demo.
What is it?
HTTP API routes + CORS; set const API_BASE in app.js (no trailing slash).
How to do it
GET/POST /notes, DELETE /notes/{id}; paste invoke URL into app.js.
API_BASE
Example
Add note in UI → Network 201 → list refreshes.