This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $ bin/rails g scaffold drink | |
| Running via Spring preloader in process 38277 | |
| Expected string default value for '--serializer'; got true (boolean) | |
| invoke active_record | |
| create db/migrate/20170302183027_create_drinks.rb | |
| create app/models/drink.rb | |
| invoke test_unit | |
| create test/models/drink_test.rb | |
| create test/fixtures/drinks.yml | |
| invoke resource_route |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| group :development do | |
| gem 'listen', '~> 3.0.5' | |
| # Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring | |
| gem 'spring' | |
| gem 'spring-watcher-listen', '~> 2.0.0' | |
| gem 'foreman', '~> 0.82.0' | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| namespace :start do | |
| task :development do | |
| exec 'foreman start -f Procfile.dev' | |
| end | |
| desc 'Start production server' | |
| task :production do | |
| exec 'NPM_CONFIG_PRODUCTION=true npm run postinstall && foreman start' | |
| end | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "name": "list-of-ingredients-client", | |
| "version": "0.1.0", | |
| "private": true, | |
| "proxy": "http://localhost:3001", | |
| "dependencies": { | |
| "react-scripts": "0.9.3", | |
| "react": "^15.4.2", | |
| "react-dom": "^15.4.2", | |
| "semantic-ui-css": "^2.2.9", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| web: bundle exec rails s |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # See https://help.github.com/ignore-files/ for more about ignoring files. | |
| # dependencies | |
| /node_modules | |
| # testing | |
| /coverage | |
| # misc | |
| .DS_Store |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| heroku buildpacks:add heroku/nodejs --index 1 | |
| heroku buildpacks:add heroku/ruby --index 2 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import React, { Component } from 'react'; | |
| import logo from './logo.svg'; | |
| import './App.css'; | |
| class App extends Component { | |
| componentDidMount() { | |
| window.fetch('api/drinks') | |
| .then(response => response.json()) | |
| .then(json => console.log(json)) | |
| .catch(error => console.log(error)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| web: cd client && PORT=3000 npm start | |
| api: PORT=3001 && bundle exec rails s |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Rails.application.routes.draw do | |
| devise_for :admin_users, ActiveAdmin::Devise.config | |
| ActiveAdmin.routes(self) | |
| scope '/api' do | |
| resources :drinks | |
| end | |
| end |