📗 Table of Contents

Hello Rails Backend is a basic Rails API that has an endpoint that returns a random greeting from a previously set-up database table in JSON format. You can find the front end built with React here. This has been made as an exercise for Microverse Bootcamp.

🛠 Built With

Tech Stack

Client
Server
Database

Key Features

  • Returns a random greeting from the API endpoint in JSON format.
  • Ruby on Rails API implementation.
  • PostgreSQL database used.

(back to top)

🚀 Live Demo

This is simply an exercise and it will not be deployed.

(back to top)

💻 Getting Started

To get a local copy up and running, follow these steps.

Prerequisites

To run this project you need:

  • Ruby version 2.7.0+
  • Rails version 7+
  • PostgreSQL
  • Node.js
  • Npm or Yarn

Setup

Clone this repository to your desired folder:

https://github.com/crclothier/hello-rails-back-end.git
cd hello-rails-back-end

Install

Install this project with:

bundle install
npm install

or

yarn install

Usage

This app uses PostgreSQL databases for data preservation. Please provide valid credentials in the /config/database.yml file.

To initialize the database run:

rails db:create
rails db:migrate

To create initial data in your database run:

rails db:seed

This will create 5 records with greetings in different languages.

To run the server, execute the following command:

rails s` or `rails server

This will start the server on http://localhost:3000/
To reach the API endpoint go to http://localhost:3000/api/greeting

Run tests

N/A

Deployment

N/A

(back to top)

👥 Authors

👤 Chris Clothier

(back to top)

🔭 Future Features

User suggested greetings - create an API endpoint for user suggested greetings to be submitted and added to the greetings list.

(back to top)

🤝 Contributing

Contributions, issues, and feature requests are welcome!

Feel free to check the issues page.

(back to top)

⭐️ Show your support

If you like this project please give it a star ⭐

(back to top)

🙏 Acknowledgments

  • Microverse Bootcamp
  • Your name will go here if you contribute 😎

(back to top)

📝 License

This project is MIT licensed.

(back to top)