@avinash-baraiya/pragma-server
v0.1.1
Published
Web-standard HTTP handler for Pragma natural-language table queries.
Maintainers
Readme
@avinash-baraiya/pragma-server
HTTP endpoint for Pragma. Keeps model credentials on the server and resolves schemas from its own registry.
import { createPragmaHandler, toNodeHandler } from '@avinash-baraiya/pragma-server';
const handler = createPragmaHandler({ schemas: { customers }, provider, authorize, rateLimit });
export const POST = handler; // Next.js, Hono, Bun, Deno, Workers
app.post('/api/pragma', toNodeHandler(handler)); // Express / node:httpCompleted interpretations return 200; every failure returns RFC 9457 application/problem+json with a stable code and the requestId.
Docs: integration · security · errors
