[READ ONLY MIRROR] Spark Social AppView Server github.com/sprksocial/server
atproto deno hono lexicon
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

at main 26 lines 667 B view raw
1import { RepoSubscription } from "./data-plane/subscription.ts"; 2import { IdResolver, MemoryCache } from "@atp/identity"; 3import { ServerConfig } from "./config.ts"; 4import { Database } from "./data-plane/db/index.ts"; 5 6const cfg = ServerConfig.readEnv(); 7 8const idResolver = new IdResolver({ 9 plcUrl: cfg.plcUrl, 10 didCache: new MemoryCache(), 11}); 12const db = new Database(cfg); 13db.connect(); 14 15const savedCursor = cfg.debugMode ? null : await db.getCursorState(); 16const startCursor = savedCursor !== null ? savedCursor : undefined; 17 18const sub = new RepoSubscription({ 19 cfg, 20 db, 21 idResolver, 22 startCursor, 23}); 24 25sub.start(); 26console.info("Subscription started");