A scalalbe REST API to check profanity in chunks (at scale)
const res = await fetch("https://profanity-api.profanity-prod.workers.dev/", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({ message }),
});
- Backend - Hono
- Database - @upstash/vector
- Deployment - Cloudflare Workers
$ git clone <...>
$ cd profanity-api
# or any other package manager - remove the current lock file
$ pnpm install
$ pnpm wrangler dev index
Make sure to add the required env
# @upstash vector db credentials
VECTOR_URL=...
VECTOR_TOKEN=...
You will require a Cloudflare
account to deploy it under their workers/pages
- simple test-frontend to hit the endpoint