/hello-rails-react

Practice connecting a Ruby on Rails back-end and React front-end. Practice connecting a Ruby on Rails back-end and React front-end.

Primary LanguageRuby

Hello Rails React

Connect previous knowledge with new knowledge as we get .
a chance to use the react-rails gem.

This gem allows you to build React components as a part of your Rails JavaScript and serve it in a component, react_component, to be used in a regular ERB file.

Built With

  • Rails 7 ~ Ruby Web development framework
  • React, Redux, Routers ~ Javascript Libraries

Getting Started

To get a local copy up and running follow these simple example steps

  • From your terminal enter in sequence
    • git clone https://github.com/od-c0d3r/hello-rails-react
    • code hello-rails-react

Available Scripts

In the project directory, run in order:

  • npm install

    • Install the project dependencies.
  • rails db:create

    • Creates the project database.
  • rails db:migrate

    • Creates the tables in the database.
  • rails db:seed

    • Populate the tables with default records.
  • rails server

  • ./bin/webpack

    • Combine React app modules.
      • You might run up with error : opensslErrorStack
        In that case run in terminal : export NODE_OPTIONS=--openssl-legacy-provider
  • [EXTRA] ./bin/webpack-dev-server

    • The page will reload when you make changes to any of Js modules.

Coders

👤 Omar Rashad

🤝 Contributing

Contributions, issues, and feature requests are welcome!

Feel free to check the issues page.

Show your support

Give a ⭐️ if you like this project!

License

This project is MIT licensed.