Set up a "Hello world" project with rails-react gem 🟢


Setup

To get a local copy up and running follow this simple step:

  • Clone repository to your local machine: git@github.com:TesheMaximillan/hello-rails-react.git This will create a directory in the name of the project folder.

  • Navigate to project folder using cd hello-rails-react

Install

  • Run bundle install to install all gems for the project.

Usage

  • Run rails s to start the server
  • Open http://127.0.0.1:3000/ in your browser to use the app

Tests

  • Run rspec to run the tests

Basic Requirements:


  • Create a new Rails app called 'hello-rails-react'.
  • Initialize your project with Git.
  • Set up your project with webpacker the react-rails gems as describe in the previous lesson's tutorial.
  • Make sure that your project has a Postgres database set up.
  • Create a table for storing your messages and create 5 different greetings.
  • Create an API endpoint that selects a random greeting from your table (you will need a controller with an action and Rails route).
  • Create a static view that will be the root of your app.

  • Create the App component with react-router and render it in your static view.
  • Create the Greeting component that will display a greeting. Set it up as a route in your App component.
  • Create a store, an action and a reducer that will connect to you API endpont to get the random greeting.
  • Display the random greeting in your Greeting component.

Technical Requirements:


For Technical Requirements

  • PostgreSQL for Database
  • Ruby on Rails for backend and rails-react for frontend

Authors

👤 Teshome Kurabachew

🤝 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!

Acknowledgments

Microverse

📝 License

This project is MIT licensed.