a collection of lightweight TypeScript packages for AT Protocol, the protocol powering Bluesky
atproto bluesky typescript npm
105
fork

Configure Feed

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

README.md

@atcute/xrpc-server-deno#

Deno WebSocket adapter for @atcute/xrpc-server.

deno add npm:@atcute/xrpc-server-deno

see the subscriptions section in the main package for usage details.

import { XRPCRouter } from '@atcute/xrpc-server';
import { createDenoWebSocket } from '@atcute/xrpc-server-deno';

import { ComExampleSubscribe } from './lexicons/index.ts';

const adapter = createDenoWebSocket();
const router = new XRPCRouter({ websocket: adapter });

router.addSubscription(ComExampleSubscribe.mainSchema, {
	async *handler({ params, signal }) {
		while (!signal.aborted) {
			yield {
				// ...
			};
		}
	},
});

export default router satisfies Deno.ServeDefaultExport;