Skip to content

tacitknowledge/lunch

 
 

Repository files navigation

Lunch

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

Setup

Environment variables

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

OAUTH_DOMAIN is optional, but it allows you to restrict logins to a specific domain (such as your company's)

Google project

For GOOGLE_CLIENT_* env variables:

  • Create a Google Developer app in the console.
  • Enable the Google+ API, Contacts API, and Google Maps JavaScript API.
  • Go to the Credentials section and create an OAuth client ID.
  • For local development:
    • Enter http://localhost:3000 and http://localhost:3001 as authorized JavaScript origins
    • Enter http://localhost:3000/login/callback and http://localhost:3001/login/callback as authorized redirect URIs
  • Add your deployment target(s) as additional origins/redirect URIs.
  • Go back to the Credentials section and create an API key.
    • Choose "Browser key".
    • Optionally limit requests to certain referrers.

Database

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

Commands

After setting up your environment:

npm install
npm install -g sequelize-cli
sequelize db:migrate

Development server

Running

npm start

Production server

Building

npm run build

Running

node build/server.js

Deploying

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

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.

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 88.7%
  • CSS 7.0%
  • HTML 4.3%