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.
Client
Server
Database
- Returns a random greeting from the API endpoint in JSON format.
- Ruby on Rails API implementation.
- PostgreSQL database used.
This is simply an exercise and it will not be deployed.
To get a local copy up and running, follow these steps.
To run this project you need:
- Ruby version 2.7.0+
- Rails version 7+
- PostgreSQL
- Node.js
- Npm or Yarn
Clone this repository to your desired folder:
https://github.com/crclothier/hello-rails-back-end.git
cd hello-rails-back-end
Install this project with:
bundle install
npm install
or
yarn install
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
N/A
N/A
👤 Chris Clothier
- GitHub: @CRClothier
- LinkedIn: LinkedIn
User suggested greetings - create an API endpoint for user suggested greetings to be submitted and added to the greetings list.
Contributions, issues, and feature requests are welcome!
Feel free to check the issues page.
If you like this project please give it a star ⭐
- Microverse Bootcamp
- Your name will go here if you contribute 😎
This project is MIT licensed.