Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Flossed Today reminds you to floss with a daily email.
JavaScript CSS
Branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
public Fix settings
views
.env.example
.gitignore Initial commit
Procfile
README.md
app.js
constants.js
flossedtoday.png
heroku-scheduler-example.png
inbound-install-example.png
inbound-setup-example.png
models.js
package.json
task.js

README.md

Flossed Today

Have you flossed today? This application will help remind you. It uses SendGrid's APIs (mail and inbound parse) to make it happen.

Usage

Setup your .env file.

cp .env.example .env

Edit the .env file with your credentials.

Start the server and ngrok.

node app.js
ngrok 3000

Setup SendGrid's Parse API. It will look something like the following. The flossedtoday.bymail.in should be the same value you set in the REPLYTO environment variable.

For example, you could use yourusername.bymail.in.

Visit localhost:3000 and sign up with your email.

The last step is to run task.js.

node ./task.js

This will send you an email if the time is 16 UTC hour. If you want to change to your current UTC hour, change the DEFAULT_REMINDER_HOUR_UTC in the .env file.

Installation

git clone https://github.com/scottmotte/flossedtoday
cd flossedtoday
heroku create
heroku addons:add scheduler
heroku addons:add sendgrid
heroku addons:add redistogo
heroku config:set REPLYTO=inbound@yoursendgridusername.bymail.in
git push heroku master

Then setup heroku scheduler to run once every hour like the following:

Then setup the SendGrid parse API to use the inbound@yoursendgridusername.bymail.in you setup as the REPLYTO.

Type the following to get your sendgrid username and password.

heroku config

Then go to http://sendgrid.com/login. After logging in with those credentials, visit the parse settings. Set those up like the following, but with your inbound email and url of the app.

You'r done. Now go and signup and tell others to signup. They will start receiving email messages asking if they flossed today or not. If they reply yes then the reminders will stop. Otherwise, they will be reminded up to 3 more times that day.

Something went wrong with that request. Please try again.