Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/m-anwar-hussaini/hello-rails-back-end
https://github.com/m-anwar-hussaini/hello-rails-back-end
Last synced: 16 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/m-anwar-hussaini/hello-rails-back-end
- Owner: M-Anwar-Hussaini
- License: mit
- Created: 2024-01-17T17:25:50.000Z (10 months ago)
- Default Branch: develop
- Last Pushed: 2024-01-19T07:30:08.000Z (10 months ago)
- Last Synced: 2024-10-03T23:22:52.831Z (about 1 month ago)
- Language: Ruby
- Size: 45.9 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Hello Rails Back-End
# π Table of Contents
- [π Table of Contents](#-table-of-contents)
- [ About the Project](#about-project)
- [π Project Requirements](#project-requirements)
- [π Hello Rails Front-End](#integration-with-hello-rails-front-end)
- [π» API Endpoints](#api-endpoints)
- [π Getting Started](#getting-started)
- [Prerequisites](#prerequisites)
- [Setup](#setup)
- [Run the Project](#run-the-project)
- [π₯ Author](#authors)
- [π Issues](#issues)
- [π€ Contributing](#contributing)
- [βοΈ Show Your Support](#οΈsupport)
- [π License](#license)*Hello Rails Back-End* is a Rails API app that provides random greetings through an API endpoint. This project meets the following requirements:
- Create a Rails API app called 'hello-rails-back-end'.
- Initialize the project with Git.
- Set up a Postgres database and create a table for storing messages.
- Populate the table with 5 different greetings.
- Create an API endpoint that selects a random greeting from the table.## π Integration with Hello Rails Front-End
The front-end link [Hello Rails Front-End](https://github.com/M-Anwar-Hussaini/Hello-React-Front-End) project.
- Ruby on Rails framework
-
Use Linters to check code quality
- Rubocop
- MVC architectural/design pattern
- Data persistent in PostgreSQL
- RESTful API
- **GET `/api/v1/greeting/random_greeting`**
- Returns a random greeting from the database.
To get the project up and running on your local machine, follow these steps.
### Prerequisites
Before you begin, make sure you have the following prerequisites installed on your system:
- Ruby: You need Ruby to run the Rails application.
- Bundler: Bundler is used to manage gem dependencies in your Ruby project.
- Postgres: You need Postgres as the database for the Rails app.
### Setup
Clone this repository to your desired folder:
```sh
git clone https://github.com/M-Anwar-Hussaini/Hello-Rails-Back-End.git
cd Hello-Rails-Back-End
```
Install gem dependencies:
```sh
bundle install
```
Set up the database:
```sh
rails db:create
rails db:migrate
rails db:seed
```
### Run the Project
To run the project, execute the following command:
```sh
rails server
```
The API will be accessible at `http://127.0.0.1:3000/api/v1/greeting/random_greeting`.
π€ **Anwar Hussaini**
- GitHub: [Anwar Hussaini](https://github.com/M-Anwar-Hussaini/)
Upcoming improvements:
- [ ] Add the endpoints to create greeting
- [ ] Deploy the application
Find a bug or have a feature request? [Open a new issue](https://github.com/M-Anwar-Hussaini/Hello-Rails-Back-End/issues) here on GitHub.
Contributions, issues, and feature requests are welcome! Feel free to check the [issues page](https://github.com/M-Anwar-Hussaini/Hello-Rails-Back-End/issues).
If you find this project helpful, please consider starring the repository. Your support is greatly appreciated!
This project is licensed under the MIT License - see the [LICENSE.md](./LICENSE) file for details.