feat(homelab)!: migrate to svelte kit, add more server stats endpoints

This commit is contained in:
2026-01-12 00:09:22 -08:00
parent 1f43dff2c5
commit 73b6cc4f1d
29 changed files with 721 additions and 107 deletions

View File

@@ -2,13 +2,14 @@ type StatsResponse = {
status: string;
players_online: number;
max_players: number;
uptime: string;
uptime: {
seconds: number;
started_at: string;
};
world_size: string;
};
export const fetchStats = async () => {
const response = await fetch(
"http://localhost:5173/api/minecraft-server-stats",
);
const response = await fetch("/api/minecraft-server-stats");
return (await response.json()) as StatsResponse;
};