Simple app that make food ordering easy usign authentication with GitHub.
- Download app
- Install all gems
bundle install
- Migrate database
rake db:migrate
- Create GitHub app
- Set up figaro gem, to use ENV variables in development, in config/application.yml
GITHUB_KEY: "Client ID"
GITHUB_SECRET: "Client Secret"
6.Change server path in public/app/app.js
var serverUrl = "http://localhost:3000"; //development
- Enjoy FoodOrder app
Default CROS are liberal and also unsafe. You can change them in config/initializers/cors.rb
Rails.application.config.middleware.insert_before 0, Rack::Cors do
allow do
origins '*'
resource '*',
:headers => :any,
:expose => ['access-token', 'expiry', 'token-type', 'uid', 'client'],
:methods => [:get, :post, :options, :delete, :put]
end
end