15 lines
580 B
TypeScript
15 lines
580 B
TypeScript
import { ManagedCaptchaService } from "./service.ts";
|
|
export * from "./types.ts";
|
|
export * from "./store.ts";
|
|
export * from "./service.ts";
|
|
|
|
if (import.meta.main) {
|
|
const port = Number(process.env.PORT ?? 8787);
|
|
const service = new ManagedCaptchaService({
|
|
adminToken: process.env.CAPTCHA_ADMIN_TOKEN ?? "replace-this-development-admin-token",
|
|
baseUrl: process.env.CAPTCHA_BASE_URL ?? `http://localhost:${port}`,
|
|
});
|
|
Bun.serve({ port, fetch: (request) => service.handle(request) });
|
|
console.log(`WRNexus Managed CAPTCHA listening on http://localhost:${port}`);
|
|
}
|