Table of Contents
The Greeting App is a simple web application built to demonstrate the implementation of a connection between a Ruby on Rails back-end and a React front-end. It generates random greetings and serves as a learning tool for understanding the integration between these two technologies.
The frontend repository for the Greeting App can be found at hello-rails-front-end. It contains the code for the user interface and interacts with the backend server.
- Back end: Ruby on Rails
- Database: PostgreSQL
- The backend server provides the following key features:
- Endpoint: /random_greeting
- Description: This endpoint returns a random greeting message.
- Method: GET
- Response: JSON object with the following structure:
{
"greeting": "Hello, World!"
}
To run this project locally, you'll need to follow these steps.
Make sure you have the following installed on your machine:
Clone this repository to your desired foler.
cd my-project
git clone https://github.com/tanveerisonline/rails-react-backend.
Install the required gems with:
bundle install
Install node dependencies with:
npm install
Create the databases and run migrations with:
rails db:create
rails db:migrate
To load the sample data, run:
rails db:seed
To run the development server, execute the following command:
rails server
I am always looking for ways to improve my project. If you have any suggestions or ideas, I would love to hear from you.
Tanveer Ahmad
- Add more endpoints
Contributions, issues, and feature requests are welcome!
If you like this project, please consider giving it a ⭐.
I would like to thank all code reviewers for making this project better.
This project is MIT licensed.