pigeonpost v0.0.0
E-Mail Scheduler / API
The following outlines the details for collaborating on this Node application.
Prerequisites
You will need the following things properly installed on your computer.
Note: Due to the dependency on Crontab, this application will not run easily on Windows.
Installation
git clone git@github.com:bocoup/email
this repositorycd email
change into the new directorymkdir config && scp nest.bocoup.com:/mnt/secrets/ses.json config
- get credsnpm install
install the third-party dependencies
Note: If you are forking this for personal use, AWS credentials must be provided at ./config/ses.json
in the following format:
{
"key": "AWS_KEY",
"secret": "AWS_SECRET"
}
Usage
By design this application is meant to be standalone on a server and act as a server daemon. If you would like to directly integrate with your pre-existing server, this application also acts as express middleware.
API
The Bocoup E-Mail API should follow JSON-API for errors and data. You must set the content type request header to JSON.
Note: jQuery and other popular request libraries may add this automatically.
Content-Type: application/json
The API is versioned and the current stable is v1. Therefore you should format your requests like so:
http://email.bocoup.com/api/v1/
Documentation
Sending
This is the endpoint you'll hit when you want to immediately send an email. Useful for one off emails, such as new account registration or forgot password.
Pollers
These are jobs that are executed on a specific schedule. They are assigned using Crontab, and allow any valid schedule expression within that format. You would use this endpoint to schedule emails to be sent every day/month/year, schedule an email to be sent 5 minutes from now, etc.
Running / Development
npm start
- Visit your app at http://localhost:8000.
Running Tests
npm test
Deploying
Vagrant
vagrant up
Production
Deploy & Provision:
npm run deploy
npm run provision
OR (more verbose)
./deploy/deploy-production.sh
./deploy/provision-production.sh
10 years ago