This project is a Rails back-end that connects to a React front-end to display a random message.
- Create a new Rails API app called 'hello-rails-back-end'.
- Initialize your project with Git.
- Make sure that your project has a Postgres database set up.
- Create a table for storing your messages and create 5 different greetings.
- Create an API endpoint that selects a random greeting from your table (you will need a controller with an action an rails route).
- Ruby
- Ruby on Rails
- React
- Redux
- rubocop
To get a local copy up and running follow these simple example steps.
Ruby: 2.7.0 Rails: 6.0.3
Setup
- Clone this repository with
https://github.com/enkog/hello-rails-back-end.git
using your terminal or command line. - Change to the project directory by entering
cd hello-rails-back-end
in the terminal - Next run
bundle install
to install the necessary dependencies - run
rails db:create
- Run
rails db:migrate
to setup your local database. - Run
rails db:seed
to get seeded data for project. - Run
sudo service postgresql start
to start the database service. - Finally run
rails s
to start the application.
Start server with:
rails s
Open http://localhost:3000/
in your browser.
👤 Oguadinma Nkiruka Ngozika
Contributions, issues and feature requests are welcome!
Feel free to check the issues page.
Give a ⭐️ if you like this project!
Microverse