A Reactive Microservice to listen kafka events and send out emails using SendGrid
Create a file .env
with appropriate ENV. VARIABLES Values. Application reads this value while bootstrapping. e.g. Fill the SandGrid API Key and Template Id.
# Application Config
NODE_ENV="development"
EMAILS="[email protected],[email protected]"
# API Related Config
SENDGRID_API_KEY=""
FROM_EMAIL="[email protected]" # Verify "from-email" address from sendgrid as well
EMAIL_TEMPLATE_ID="" # If you want to use Template from SendGrid, otherwise keep it blank
# Kafka Related Config
KAFKA_CLIENT_ID="unique-client-id"
KAFKA_GROUP_ID="email-service"
KAFKA_BROKERS="localhost:9092"
KAFKA_USERNAME=""
KAFKA_PASSWORD=""
KAFKA_TOPIC="article.created"
npm install
ORyarn
node src/app.js
docker build -t email-service .
docker run -p 3009:3009 --env-file=".env" email-service
docker build -t kubedrop/email-service .
docker login
docker push kubedrop/email-service