Mailer application is a simple email app which creates emails and stores them in an external database. In order to test it locally you need to run mailer-worker which is a service running in background.
The application offers the following options for scheduling emails:
- now
- later - on a specific date
- custom occurrence
- repeat - daily, weekly, monthly or yearly
- ends - never, on(date), after(occurrences)
- Clone the repository
git clone git@github.com:shterion/mailer-app.git
- In the root directory run
npm install
to install server dependencies - Navigate to client with
cd client/
and runnpm install
to install client dependencies - You should create a
.env
file in the root directory with the following variables:
DB_USERNAME
- your MongoDB usernameDB_PASSWORD
- your MongoDB passwordAPPLICATION_NAME
- application name is only used for a local testing
IMPORTANT: For local testing the
APPLICATION_NAME
variable in mailer-worker MUST be the same as this one here. They have to be identical.
- In root directory run
npm run dev
- The app should be running on
localhost:5000
Endpoint | Method | Description | Required properties |
---|---|---|---|
/api/v1/emails | POST | Email creation | recipient , to , text , date , sendType , repeatType |
The application is deployed on heroku using Travis CI and it could be accessed on email-scheduler-app.herokuapp.com/