Can I Eat Here is a web app for finding restaurants that provide food you can consume; in spite of your restrictions.
This repo is to serve as a reference for how to iteratively build web applications in Sinatra.
I would recommend reading this repository commit by commit in github. Add comments asking questions on lines of code.
- A User may search for Restaurants by SupportedRestriction
- A User may tag a Restaurant With a SupportedRestriction
- A User may create a Restriction
- A guest may register as a User
- A User may create a Restaurant
- A User may search for Restaurants by Location
- Clone the repo
bundle install --without production
cp .env.example .env
rerun -c rackup
- Open it in your browser!
- Install the Heroku Toolbelt
heroku create
heroku config:set SESSION_SECRET=$(ruby -r 'securerandom' -e 'puts SecureRandom.hex(256)')
- This sets a long, random string for the apps session secret.heroku config:set GOOGLE_GEOCODER_API_KEY="whatever_your_key_is"
git push heroku
heroku open
Google restricts your requests to 2500 requests per day; so be considerate if
you're using the key in .env.example
. To get your own key:
- Create a project at https://console.developers.google.com/project
- Follow these instructions to enable API access: https://developers.google.com/maps/documentation/geocoding/#api\_key
- Get your "Public API Access" API Key from the "Apis & Auth" -> "Credentials" page
- Update
GOOGLE_GEOCODER_API_KEY
in.env
or viaheroku config:set