- 📖 About the Project
- 🛠 Build With
- 🚅 Link to Back-end repository
- 📖 Getting Started
- 👥 Authors
- 🔭 Future Features
- 🤝 Contributing
- ⭐️ Show your support
- 🙏 Acknowledgment
- 📜 License
This is a simple app to demonstrate how to connect a Ruby on Rails back-end with a React front-end using Webpack. This project helps you achieve the following learning objectives:
- Implement a connection between a Ruby on Rails back-end and a React front-end.
- Understand the pros and cons of different approaches for connecting Ruby on Rails with React.
- Understand how to use Webpack to bundle a React front-end with a Ruby on Rails back-end.
- Ruby on Rails
- React
- Webpack
- PostgreSQL
- Ruby on Rails and React Integration
- Webpack Configuration
- React Components
- Rails greetings from internal API
Hello rails react app [Back-end]
-
Clone the Project Repository:
git clone git@github.com:sergio-usma/hello_react_rails_frontend.git
-
Navigate to the Project Folder:
cd hello_react_rails_frontend
Before you can run the app, ensure you have the following prerequisites and configurations in place:
-
Ruby: Verify that Ruby is installed on your machine by running
ruby -v
in your terminal. If not, download and install Ruby from the official Ruby website. -
Ruby on Rails: Install the Ruby on Rails framework using the following command if you haven't already:
gem install rails
-
Code Editor: Use a code editor like Visual Studio Code (VSCode). If you don't have it, download it from the official website.
-
Git: Make sure Git is installed and configured for version control. Download Git from the official Git website.
-
PostgreSQL: Install and properly configure PostgreSQL on your development server. We assumes the use of PostgreSQL as the default database. Download PostgreSQL from the official PostgreSQL website.
-
Ruby on Rails Configuration: Configure your Ruby on Rails project to use PostgreSQL as the default database.
With these prerequisites and configurations in place, you're ready to set up and run the app.
In the project directory, you can run:
npm start
-
Runs the app in the development mode.
Open http://localhost:3000 to view it in your browser. -
The page will reload when you make changes.
You may also see any lint errors in the console.
npm run build
-
Builds the app for production to the
build
folder.
It correctly bundles React in production mode and optimizes the build for the best performance. -
The build is minified and the filenames include the hashes.
Your app is ready to be deployed!
npm run eject
Note: this is a one-way operation. Once you eject
, you can't go back!
To access the API endpoint go to:
http://localhost:3000/api/greetings/random
👤 Sergio Usma
- GitHub: @sergio-usma
- Twitter: @VonUsma
- LinkedIn: Sergio Andres Usma
- Personalized Greetings
- API endpoint working
Contributions, issues, and feature requests are welcome! Feel free to check the issues page and contribute to the project.
If you like this project, please consider supporting us! Your support helps us to continue developing and improving our project for everyone to enjoy. Whether it's a small donation, sharing the project with your friends, or contributing your skills and expertise, every little bit makes a huge difference. With your support, we can create something truly amazing together. Thank you for being a part of our community and helping us to make a difference!
I would like to express my heartfelt gratitude to Microverse for providing us with the opportunity to work on this project.
This project is licensed under the MIT License.