Skip to content

edgee-cloud/mailchimp-subscribe-component

Mailchimp component for Edgee

Coverage Status GitHub issues Edgee Component Registry

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.

Quick Start

  1. Download the latest component version from our releases page
  2. Place the mailchimp.wasm file in your server (e.g., /var/edgee/components)
  3. 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"

How to use the HTTP endpoint

You can send requests to the endpoint as follows:

await fetch('/subscribe', {
  method: 'POST',
  body: JSON.stringify({
    "email_address": "[email protected]"
  })
});

Development

Building from Source

Prerequisites:

Build command:

edgee component build

Test command (with local HTTP emulator):

edgee component test

Test coverage command:

make test.coverage[.html]

Contributing

Interested in contributing? Read our contribution guidelines

Security

Report security vulnerabilities to [email protected]

About

Mailchimp Subscribe Edgee Component

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Packages

No packages published