https://github.com/indiecodermm/hello-rails-back-end
Rails API for greeting app
https://github.com/indiecodermm/hello-rails-back-end
Last synced: 9 months ago
JSON representation
Rails API for greeting app
- Host: GitHub
- URL: https://github.com/indiecodermm/hello-rails-back-end
- Owner: IndieCoderMM
- License: mit
- Created: 2023-05-16T08:18:16.000Z (almost 3 years ago)
- Default Branch: dev
- Last Pushed: 2023-05-17T04:32:57.000Z (almost 3 years ago)
- Last Synced: 2025-03-14T10:23:49.561Z (about 1 year ago)
- Language: Ruby
- Size: 32.2 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Table of Contents
- [👋 Greeting App : Backend Repo](#-greeting-app--backend-repo)
- [📂 Frontend Repository](#-frontend-repository)
- [🧰 Tech Stack ](#-tech-stack--)
- [✨ Key Features ](#-key-features--)
- [📘 Getting Started ](#-getting-started--)
- [📋 Prerequisites](#-prerequisites)
- [📁 Setup](#-setup)
- [📥 Installation](#-installation)
- [💾 Database](#-database)
- [💻 Usage](#-usage)
- [👨🚀 Author ](#-author--)
- [🎯 Future Features ](#-future-features--)
- [🤝 Contribution ](#-contribution--)
- [💖 Show Your Support ](#-show-your-support--)
- [🙏 Acknowledgements](#-acknowledgements)
- [📜 License ](#-license-)
# 👋 Greeting App : Backend Repo
**This project is a backend server for my greeting app.**
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.
## 📂 Frontend Repository
The frontend repository for the Greeting App can be found at [hello-react-front-end](https://github.com/indiecodermm/hello-react-front-end). It contains the code for the user interface and interacts with the backend server.
The backend server is built using the following technologies:
- Framework: Ruby on Rails
- Database: PostgreSQL
The backend server provides the following key features:
**Random Greeting Endpoint**
- Endpoint: `/random_greeting`
- Description: This endpoint returns a random greeting message.
- Method: GET
- Response: JSON object with the following structure:
```json
{
"greeting": "Hello, World!"
}
```
To run this project locally, you'll need to follow these steps.
### 📋 Prerequisites
Make sure you have the following installed on your machine:
- [Ruby 3.1.3 or higher](https://www.ruby-lang.org/en/)
- [Rails 7.0.4 or higher](https://rubyonrails.org/)
- [PostgreSQL 15.2 or higher](https://www.postgresql.org/)
### 📁 Setup
Clone this repository to your desired foler.
```sh
cd my-project
git clone git@github.com:IndieCoderMM/hello-rails-react.git .
```
### 📥 Installation
Install the required gems with:
```sh
bundle install
```
### 💾 Database
Create the databases and run migrations with:
```sh
rails db:create
rails db:migrate
```
To load the sample data, run:
```sh
rails db:seed
```
### 💻 Usage
To run the development server, execute the following command:
```sh
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.
**Hein Thant**
[](https://github.com/IndieCoderMM)
[](https://linkedin.com/in/hthantoo)
[](mailto:hthant00chk@gmail.com)
- [ ] Add more endpoints
Contributions, issues, and feature requests are welcome!
If you like this project, please consider giving it a ⭐.
## 🙏 Acknowledgements
I would like to thank all code reviewers for making this project better.
This project is [MIT](./LICENSE) licensed.