tableflip/makelunch

Name: makelunch

Owner: TABLEFLIP

Description: :hocho: Who's cooking?

Created: 2015-06-30 15:50:48.0

Updated: 2017-05-08 08:17:19.0

Pushed: 2017-05-09 08:20:08.0

Homepage:

Size: 14003

Language: JavaScript

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

Make Lunch!

CircleCI - https://lunch.tableflip.io

Helps figure out who should cooking next by recording stats on how many servings you've made vs how many you've received.

If I cook for 8 people (including me), I recieve 1 portion and give 8, so am +7

Meals are historical records. The stats on the Eaters are calculated on meal insert. It's an experiment in document storage style.

To recommend who cooks next we look at how has the lowest value of servings.given - servings.recieved.

TODO:

Getting started
Build it with Docker
ild it
er build -t makelunch .

n it
er run -p 3000:3000 -u "node" \
MONGO_URL=mongodb://<ure db here>" \
ROOT_URL=http://localhost:3000" \
METEOR_SETTINGS="$(cat settings.json)" makelunch
Deploy it with now.sh

Put env config in .env.production

_URL="https://lunch.tableflip.io"
O_URL="@makelunch-mongo-url-prod"
OR_SETTINGS="@makelunch-settings-prod"

Then On the TABLEFLIP now account (if you plan to deploy to lunch.tableflip.io)

Add secrets

secret add makelunch-mongo-url-prod <db url>
secret add makelunch-settings-prod "${cat settings.json | tr -d '\n'}"

Deploy!

--dotenv=.env.production --docker

You can run that last command to your hearts content. Each deploy get's it's own url.

Once your happy with it, alias the deployment to the live URL

alias https://makelunch-zyfwsdybcl.now.sh/ lunch.tableflip.io

You should see:

w alias https://makelunch-mdpmammtdx.now.sh lunch.tableflip.io
nch.tableflip.io is a custom domain.
rifying the DNS settings for lunch.tableflip.io (see https://zeit.world for help)
ccess! Domain tableflip.io (FOn9AsAAz4hzoeh1z5Fa463G) added
rification OK!
ovisioning certificate for lunch.tableflip.io
ccess! lunch.tableflip.io now points to makelunch-mdpmammtdx.now.sh! [29s]

:rocket:

Collections

Meals


te: isoDate
ef: [userId]
ters: [userId]
ests: Integer
sh: String

Eaters


me: String,
g: url,
rvings: {
given: Integer,
received: Integer

alsCooked: Interger,
stCooked: isoDate,
stEaten: isoDate

Initial data

This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.