WIP! A BB-style forum, on the ATmosphere!
We're still working... we'll be back soon when we have something to show off!
node
typescript
hono
htmx
atproto
1import { loadConfig } from "./config.js";
2
3const config = loadConfig();
4
5export async function fetchApi<T>(path: string): Promise<T> {
6 const url = `${config.appviewUrl}/api${path}`;
7 const res = await fetch(url);
8 if (!res.ok) {
9 throw new Error(`AppView API error: ${res.status} ${res.statusText}`);
10 }
11 return res.json() as Promise<T>;
12}