Set up API client module #23
Labels
No labels
bug
duplicate
enhancement
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Blocks
Depends on
#24 Build login page
austin/vektor
#22 Remove Vite boilerplate, set up project structure
austin/vektor
Reference
austin/vektor#23
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
A typed, reusable API client that all pages will use to communicate with the backend.
What needs to happen
Create
src/lib/api.ts— a thin wrapper aroundfetch. It should:Content-Type: application/jsonon requestsapi.projects.list(),api.projects.get(key),api.issues.list(projectKey, filters?),api.issues.create(projectKey, input),api.issues.update(projectKey, number, input)Also configure the Vite dev server proxy in
vite.config.ts:/api→http://localhost:8659/auth→http://localhost:8659This lets the frontend dev server and Go backend run independently during development.
Key files
web/src/lib/api.ts— newweb/vite.config.ts— add proxy config