Statusphere, but in atcute and SvelteKit
atproto
svelte
sveltekit
drizzle
atcute
typescript
1import { env } from '$env/dynamic/private';
2
3import { TapClient } from '@atcute/tap';
4
5import { runTapSubscription } from '$lib/server/tap';
6
7if (!env.TAP_URL) {
8 throw new Error(`TAP_URL is not set`);
9}
10
11// for production deployments, consider running the firehose ingestion in a
12// separate sidecar process. the throughput from Tap (especially during
13// backfilling of existing repos) can overwhelm the server and block HTTP
14// request processing.
15{
16 const tap = new TapClient({
17 url: env.TAP_URL,
18 adminPassword: env.TAP_ADMIN_PASSWORD || undefined,
19 });
20
21 void runTapSubscription(tap).catch((err) => {
22 console.error(err);
23 });
24}