Lunch voting app
Clone or download
jenniferlynparsons and JeffreyATW Updates to readme for google api setup (#228)
* Updates to readme for google api setup

* Change http to https
Latest commit c1a5d04 Dec 21, 2018
Type Name Latest commit message Commit time
Failed to load latest commit information.
.circleci Bump node version May 2, 2018
cert Add new Chrome 58+-approved cert May 7, 2018
db Add indices to appropriate database columns. May 3, 2018
jest fix test issues Jan 19, 2018
public Update web manifest May 21, 2018
src Give notifications z-index so they appear on top of page root Sep 14, 2018
test Update page titles and description May 8, 2018
tools Add PWA features May 15, 2018
.babelrc.js Add PWA features May 15, 2018
.editorconfig Add pre-commit hook that automatically formats staged files Dec 14, 2016
.env.sample Add PWA features May 15, 2018
.eslintrc.js Lint fixes Jan 25, 2018
.flowconfig Support for absolute imports (#1312) Jun 14, 2017
.gitattributes Update Babel to v7 (#1413) Oct 2, 2017
.gitignore Use HMR flag instead of production flag Apr 26, 2018
.nycrc Remove old version of babel-polyfill Jan 27, 2018
.prettierrc.js Update dependencies; bump react to v16.2 Dec 27, 2017
.sequelizerc Add an admin superuser seed. Jan 9, 2018
.stylelintrc.js Merge remote-tracking branch 'react-starter-kit/feature/redux' into j… Mar 28, 2018
.travis.yml Merge remote-tracking branch 'react-starter-kit/feature/redux' into j… Mar 28, 2018 Fix typo on changelog (#913) Oct 15, 2016 Remove trailing spaces from docs (#1318) Jun 20, 2017
Dockerfile Switch off of Node Alpine May 2, 2018
LICENSE.txt Slightly change license to GitHub recognizes it Jan 5, 2018 Updates to readme for google api setup (#228) Dec 21, 2018
database.js add initial integration test w/ npm scripts setup (#131) Mar 27, 2018
docker-compose.yml Setting Lunch up to work with Docker Mar 19, 2016
jest.config.js fix test issues Jan 19, 2018
package.json Give notifications z-index so they appear on top of page root Sep 14, 2018
yarn.lock Give notifications z-index so they appear on top of page root Sep 14, 2018


An app for groups to decide on nearby lunch options. Check out a live version, or read the blog post about it!



Add this line to /etc/hosts:

If you will be testing subdomains, you should add an additional line for each subdomain, e.g.:

If you want to run integration tests, you will also need to add:

Environment variables

Make two copies of .env.sample, named .env and

Google project

For GOOGLE_* env variables:

  • Create a Google Developer app in the console.
  • Enable the Google+ API, Contacts API, Google Maps JavaScript API, Google Places API Web Service, and Google Maps Geocoding API.
  • Go to the Credentials section and create an OAuth client ID.
  • Click the OAuth Consent tab and add as an authorized domain.
  • Click the Credentials tab, choose "OAuth" from the Create Credentials dropdown.
  • Choose "Web Application" as the type.
  • For local development:
    • Enter and as authorized JavaScript origins
    • Enter and as authorized redirect URIs
  • Add your deployment target(s) as additional origins/redirect URIs.
  • Go back to the Credentials section and create two API keys - one for the client, and one for the server.
    • For the client, optionally limit requests to certain referrers.
  • On each API key, add http://* and https://* as HTTP referrers.


Set up a PostgreSQL database and enter the admin credentials into .env. If you want to use another database dialect, change it in database.js.

After setting up and starting the app, you will be able to log in with this user and create a team. If you did not supply a SUPERUSER_PASSWORD, you will need to log in via OAuth, using the email address you supplied for SUPERUSER_EMAIL.


After setting up your environment:

First, install Yarn. Then:

npx sequelize db:migrate

To seed your database with a Superuser, fill out the SUPERUSER_* env variables accordingly, then run

npx sequelize db:seed:all

Development server


npm start

npm start will default to localhost, but the browser should point to

Production server


npm run build


node build/server.js


You can modify tools/deploy.js as needed to work with your deployment strategy.

Service Worker

To run the service worker locally, follow the above steps to run the production server. After testing the service worker, be sure to unregister the service worker in the browser (or close all local Lunch tabs) to avoid issues when testing on the development server.


Unit tests

npm test

To run an individual file:

npm run test-file /path/to/file

Testing with coverage

npm run coverage

Integration tests

Make sure your .env file is filled out. Set up a separate test database using the same user as your development environment. Enter the following into .env.test:


Then run:

npm run integration

Individual files can be run using:

npm run integration-file /path/to/file


npm run lint

More info

This project was created using React Starter Kit. Many technology choices originate from its repository, but this project adds on Sequelize, RESTful APIs instead of GraphQL, and Redux.