revelry_generate
Generate a Rails project with a React-based view engine.
Generated App Features
Node.js render service
- Full-fledged Express app with Webpack, Babel, React, Redux, and more
- Domain-centric module structure for better code organization
- Receives POSTed JSON payloads, uses them as React props, and responds with HTML
Rails glue
jbuilder
templates define React props- Controller concern connects view rendering to the Node service
- Generator hooks cause JavaScript modules to be generated in the render service as well
Usage
Install
gem install revelry_generate
Create a new app
revelry_generate new my_app && cd my_app
Scaffold a new resource
Same as a normal Rails app:
rails g scaffold Article
Run local servers
npm run dev
Applying the template to an existing app
From the app's directory, run:
revelry_generate install