Fastify & Hono
Fastify
typescript
import Fastify from 'fastify';
import { AmlexiaClient } from '@amlexiahq/node';
import { amlexiaPlugin } from '@amlexiahq/node/fastify';
const client = new AmlexiaClient({ sdkKey: process.env.AMLEXIA_SDK_KEY! });
const app = Fastify();
await app.register(amlexiaPlugin(client, { serviceName: 'api' }));Hono
typescript
import { Hono } from 'hono';
import { AmlexiaClient } from '@amlexiahq/node';
import { amlexiaHonoMiddleware } from '@amlexiahq/node/hono';
const client = new AmlexiaClient({ sdkKey: process.env.AMLEXIA_SDK_KEY! });
const app = new Hono();
app.use('*', amlexiaHonoMiddleware(client, { serviceName: 'api' }));On Cloudflare Workers, store AMLEXIA_SDK_KEY as a secret binding — never expose publicly.
