README

Table of Contents

About Project

The rails_react_webpack app is a web application built with React and Ruby on Rails. This app demonstrates how to fetch data from a Rails API and display it. The main feature is showing a random greeting when thee user refresh the page.

Built With

  • Webpack
  • Ruby on Rails
  • React & Redux

Tech Stack

  • Webpack
  • Ruby on Rails
  • React & Redux

Key Features

  • Fetches a random greeting from the API.

Getting Started

Prerequisites

  • Node.js V18 minimum
  • npm or yarn
  • Ruby and Rails installed

Setup

  1. Clone this repository
git clone https://github.com/lily4178993/my_rails_react_webpack_app.git
cd my_rails_react_webpack_app
  1. Install dependencies
bundle install
npm install
  1. Update your database informations Go to config/database.yml. Replace your_postgres_username and your_postgres_password with your database informations
  default: &default
    adapter: postgresql
    encoding: unicode
    pool: 5
    username: [your_postgres_username]
    password: [your_postgres_password]
    host: localhost

  development:
    <<: *default
    database: [your_database_for_development]

  test:
    <<: *default
    database: [your_database_for_test]

  production:
    <<: *default
    database: [your_database_for_production]

Install

Populate greetings data in the database by running the following commands:

rails db:create
rails db:migrate
rails db:seed

Usage

Start the development server:

npm run start

Open http://localhost:3000/ to view it in your browser.

Author

Future Features

  • Implement additional API calls to the API.
  • Enhance UI/UX with animations.

Contributing

Contributions, issues, and feature requests are welcome!

Feel free to check the issues page.

Show your support

Give a ⭐️ if this project helped you!

Acknowledgements

  • React Documentation
  • Rails Documentation
  • Microverse

License

This project is MIT licensed.

(back to top)