This component provides a simple way to add a new subscriber to Mailchimp on Edgee,
served directly at the edge. You map the component to a specific endpoint such as /subscribe
, and
then you invoke it from your frontend code.
- Download the latest component version from our releases page
- Place the
mailchimp.wasm
file in your server (e.g.,/var/edgee/components
) - Add the following configuration to your
edgee.toml
:
[[components.edge_functions]]
id = "mailchimp"
file = "/var/edgee/components/mailchimp.wasm"
settings.edgee_path = "/subscribe"
settings.dc = "us1"
settings.api_key = "YOUR_KEY"
settings.list_id = "list_id"
You can send requests to the endpoint as follows:
await fetch('/subscribe', {
method: 'POST',
body: JSON.stringify({
"email_address": "[email protected]"
})
});
Prerequisites:
Build command:
edgee component build
Test command (with local HTTP emulator):
edgee component test
Test coverage command:
make test.coverage[.html]
Interested in contributing? Read our contribution guidelines
Report security vulnerabilities to [email protected]