Skip to content

enionsouza/hello-rails-react

Repository files navigation

Microverse GitHub last commit (branch) GitHub Repo stars

Hello Rails React!

About

The main goals for this exercise are:

  • Implement a connection between a Ruby on Rails back-end and React front-end.
  • Understand the pros and cons of different approaches of connecting Ruby on Rails back-end with React front-end.

Below, we can see a screenshot of the app.

Greetings page

Built With

  • Ruby on Rails
  • ReactJS, Redux
  • VisualStudio Code, Git, & GitHub

Pre-requisites

  • Ruby (v. 3.0.1)
  • Rails (v. 6.1.4)
  • NodeJs (v. 14.17)
  • YarnJs (v. 1.22.10)
  • Git

Getting Started

  1. In your terminal, in the folder of your preference, type the following bash command to clone this repository:
git clone git@github.com:enionsouza/hello-rails-react.git
  1. Now that you have already cloned the repo run the following commands to get the project up and running:
cd hello-rails-react
bundle
yarn
bin/rails db:create
bin/rails db:migrate
bin/rails db:seed
  1. Now, on your terminal, run:
bin/rails server

This should start your local server in http://localhost:3000/. Now, you can go to your browser and visit this page, and you also can open the rest API client of your choice (Thunder Client extension for VScode is recommended) to fetch a randomly selected greeting message:

Request Endpoint Method Header
Randomly selected greeting message /api/greetings GET { "Accept": "application/json", "Content-Type": "application/json" }

To stop the server, hit <CTRL> + C on your keyboard.

Author

👤 Ênio Neves de Souza

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

About

This exercise goal is to create an app to provide both: (1) an API to respond to JSON requests, and (2) a server-side renderer for a ReactJS Client Application.

Topics

Resources

License

Stars

Watchers

Forks