Warning: This is PoC project.
Before you begin:
- Make sure you have
wrangler
installed and you are logged in:npm install -g wrangler wrangler login
- Enable Email Workers
- You can create R2 databases (requires card details for free tier)
To initialise all necessary infrastructure (KV, R2, routes) and deploy Workers, run the following commands. Replace ROUTE_ZONE
and ROUTE_DOMAIN
with your Cloudflare zone/domain.
make create ROUTE_ZONE=example.com ROUTE_DOMAIN=api.example.com
make deploy
Finally, configure catch-all email routing to send all emails to elasticinbox-mda
worker.
After successful deployment:
- Send test email to your configured zone (
ROUTE_ZONE
), e.g.[email protected]
. - Access OpenAPI UI on
{ROUTE_DOMAIN}/docs
, e.g.api.example.com/docs
.
make help
create Create all Cloudflare infrastructure. Requires ROUTE_ZONE and ROUTE_DOMAIN for API Worker.
delete Delete Cloudflare Workers
deploy Deploy Cloudflare Workers
destroy-preview Destroy only preview Cloudflare infrastructure
destroy Destroy all Cloudflare infrastructure
cd worker-api
wrangler dev
- Exception handling and input validation
- Integration tests
- APIs for Label and Mailbox operations