Daily Email Reports
A Serverless - Node.js project to create html reports from database queries, and send those reports out in pretty emails.
Using AWS Lambda, you can then schedule this super-lightweight reporting app, to send out a daily email about new signups, basic usage etc.
Make sure you have:
The Serverless Framework installed,
An Amazon AWS account (as described by the Serverless Framework)
Install project dependencies via npm:
$ npm install
Init the project using Serverless:
$ serverless project init
Edit the config file
You have to include your database and sendmail provider's details. An example is in
/_meta_example/variables/s-variables-dev.json(and the config file to edit will be located under the
Deploy the function and the /email endpoint:
Run the function locally:
$ cd ./restApi/email $ serverless function run
Deploy it to AWS Lambda:
$ serverless dash deploy
function - emailand
endpoint - email - GET.)
(Optional) On the AWS Lambda console, create an event scheduler for the endpoint
And as always, feel free to contribute!