Skip to content

Cloudflare worker for sending application forms and subscribing to marketing newsletter by sendgrid v3 API

License

Notifications You must be signed in to change notification settings

sanyaches/cloudflare-sendgrid-worker

Repository files navigation

Cloudflare worker sendgrid example

This repository serves like an example of usage Cloudflare worker to sending different requests to Sendgrid API

Functions

  • Send email - by pure sendgrid API (Docs link)
  • Subscribe to newsletter - add contact to sendgrid marketing contact list (Docs link)

Commands

  • npm start - start wrangler development server

  • npm test - test wrangler project

Environment

Development

Add .dev.vars file to have an access in code, example below:

SENDGRID_API_KEY="YOUR_SENDGRID_API_KEY"
SITE_HOST="http://localhost:3000"

Production

Add environment variables by cloudflare worker settings panel

About

Cloudflare worker for sending application forms and subscribing to marketing newsletter by sendgrid v3 API

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published