Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/iturres/hello_rails_back_end
Simple Rails API (test) project to connect to **hello-react-front-end** project.
https://github.com/iturres/hello_rails_back_end
api-rest ruby-on-rails
Last synced: 25 days ago
JSON representation
Simple Rails API (test) project to connect to **hello-react-front-end** project.
- Host: GitHub
- URL: https://github.com/iturres/hello_rails_back_end
- Owner: ITurres
- License: mit
- Created: 2024-01-16T20:25:04.000Z (12 months ago)
- Default Branch: development
- Last Pushed: 2024-01-17T01:03:01.000Z (12 months ago)
- Last Synced: 2024-12-06T07:54:08.553Z (28 days ago)
- Topics: api-rest, ruby-on-rails
- Language: Ruby
- Homepage:
- Size: 31.3 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Hello Rails API | Back-end
---
# π Table of Contents
- [π About the Project](#about-project)
- [π Built With](#built-with)
- [Tech Stack](#tech-stack)
- [Key Features](#key-features)
- [π» Getting Started](#getting-started)
- [Prerequisites](#prerequisites)
- [Setup](#setup)
- [Install](#install)
- [Usage](#usage)
- [Run tests](#run-tests)
- [π₯ Authors](#authors)
- [π Future Features](#future-features)
- [π€ Contributing](#contributing)
- [βοΈ Show your support](#support)
- [π Acknowledgements](#acknowledgements)
- [π License](#license)---
# π Hello Rails API | Back-end
> Hello Rails API is a project that aims to connect a Ruby on Rails back-end with a [React front-end](https://github.com/ITurres/hello-react-front-end/tree/project-setup-and-front).
#### Learning objectives
- 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.
---
- Rails API back-end with PostgreSQL database.
---
---
To get a local copy up and running, follow these steps.
### Prerequisites
To run this project you need:
- Have Ruby installed. If you need to install Ruby, follow the instructions on the [official page](https://www.ruby-lang.org/en/documentation/installation/).
### Setup
Clone this repository to your desired folder:
Example commands:
- With SSH:
```bash
cd my-folder
git clone [email protected]:ITurres/hello_rails_back_end.git
```
- With HTTPS:
```bash
cd my-folder
git clone https://github.com/ITurres/hello_rails_back_end.git
```
- With GitHub CLI:
```bash
cd my-folder
gh repo clone ITurres/hello_rails_back_end
```
Go to the project directory:
```bash
cd hello_rails_back_end
```
Before running the program, verify that you have Ruby on Rails installed on your OS by running the following command:
```bash
rails --version
```
It should show you the version of Ruby On Rails ββinstalled. If this does not happen and only an error message is displayed, you should verify your installation or install Ruby on Rails from scratch.
[Download and Install Ruby on Rails](https://guides.rubyonrails.org/getting_started.html)
Once you have verified that you have Ruby on Rails installed, run the following command to install the necessary gems:
```bash
bundle install
```
After installing the gems, run the following command to create the database:
```bash
rails db:create
```
Then run the following command to migrate the database and seed it with the necessary data:
```bash
rails db:migrate
rails db:seed
```
Run the following command inside the project folder to start the application:
Note: The application will run in port 3001 since the front-end will run in port 3000.
Port 3001 is not the default, so you are free to change it if you want.
```bash
rails s -p 3001
```
This will start the application on your local server. You can now open your browser and go to [http://localhost:3001/](http://localhost:3001/) to see the application running.
To execute the tests, run the following command inside the project folder (root):
```bash
bundle exec rspec
```
---
π€ **Arthur Iturres**
- GitHub: [@ITurres](https://github.com/ITurres)
- LinkedIn: [Arthur Emanuel G. Iturres](https://www.linkedin.com/in/arturoemanuelguerraiturres/)
- Angellist / Wellfound: [Arturo (Arthur) Emanuel Guerra Iturres](https://wellfound.com/u/arturo-arthur-emanuel-guerra-iturres)
- Youtube: [Arturo Emanuel Guerra Iturres - Youtube Channel](https://www.youtube.com/channel/UC6GFUFHOtBS9mOuI8EJ6q4g)
- Portfolio: [Arthur Iturres - Portfolio](https://iturres.github.io/iturres-reactive-portfolio/)
---
- [ ] Style the application.
---
Contributions, issues, and feature requests are welcome!
Kindly open any new issues or feature requests on the [repo's issues page](https://github.com/ITurres/hello_rails_back_end/issues).
---
Give a β if you liked this project!
---
I thank the **Code Reviewers** for their advice and time π
---
This project is [MIT](./LICENSE) licensed.
---