A microservice to send simple email templates
now
or
$ now bukinoshita/micro-mailer -e NODE_ENV=production -e MAILGUN_API_KEY=xxx -e MAILGUN_DOMAIN=xxx -e MAILGUN_FROM=xxx -e CORS_ORIGIN=xxx -e RATE_LIMIT_WINDOW=xxx -e RATE_LIMIT_LIMIT=xxx
Deploy to your hosting provider, set the below environment variables, and start it with yarn start
.
Define the following environment variables:
NODE_ENV
- Set it to production
.MAILGUN_API_KEY
- Mailgun api key.MAILGUN_DOMAIN
- Your mailgun domainMAILGUN_FROM
- The email you like to send emailsCORS_ORIGIN
— The origin for CORS, defaults to *
RATE_LIMIT_WINDOW
— How long to keep records of requests in memory in ms
, defaults to 1s
RATE_LIMIT_LIMIT
— Max number of requests during window, defaults to 10
MIT © bukinoshita