/**
 * Minimal Shade prekey server for the files-browser example.
 * Run on port 9992 — both Alice and Bob register here.
 */
import { createPrekeyServer, MemoryPrekeyStore } from '@shade/server';
import { SubtleCryptoProvider } from '@shade/crypto-web';

const crypto = new SubtleCryptoProvider();
const server = createPrekeyServer({
  crypto,
  store: new MemoryPrekeyStore(),
  disableRateLimit: true,
});

const port = 9992;
Bun.serve({ port, fetch: server.fetch });
console.log(`[prekey] listening on http://localhost:${port}`);
