Skip to content

mikenomitch/rails-react-router-boilerplate

Repository files navigation

README

Mike’s Rails + React boilerplate

what this has:

- rails 4
- react 0.12
- react router 0.12
- bootstap
- webpack with some loaders (see webpack.config)
- a few nice node packages and gems (gemfile and package.json)
- postgres compatability (no SQLite or Mysql tho)

Notes:

all client-side stuff should be done in client_app. main.js loads the react application in application.jsx and bootstrap + application.scss

For webpack/rails interaction, see github.com/knomedia/webpack_assets

^ that is important: ‘rake assets:webpack:watch` is the important command out of that

React is 0.12 right now, but newer versions are out - think about changing package.json to get the new ones. (also React Router could use an upgrade)

things to do before ‘rails s’:

- bundle install -> (get ruby deps)
- npm insall -> (get js deps)
- have postgres or change databse.yml for sqlite or msql -> (settings for db connected to rails)
- grep for YOUR_APP_NAME and replace it with... your app's name
- rake db:create -> (actually create the db)
- run `bin/rake assets:webpack:watch` -> (compile JSX & SCSS & other stuff and put it into the asset pipeline)
- run `rails s` and go to localhost:3000 -> (start a server)

fyi for hosting: any heroku buildpacks need to support both node & rails

About

boilerplate app with rails and react

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published