first init

This commit is contained in:
WillowMT
2026-02-20 14:00:43 +07:00
commit f17c0ba90e
21 changed files with 960 additions and 0 deletions

13
frontend/src/lib/api.ts Normal file
View File

@@ -0,0 +1,13 @@
const API_BASE = '/api'
export async function fetchHealth() {
const res = await fetch(`${API_BASE}/health`)
if (!res.ok) throw new Error('Health check failed')
return res.json()
}
export async function fetchRoot() {
const res = await fetch(API_BASE)
if (!res.ok) throw new Error('Request failed')
return res.json()
}