Coder Social home page Coder Social logo

hello-rails-back-end's Introduction

๐Ÿ“— Table of Contents

๐Ÿ“– hello-rails-back-end

hello-rails-back-end is a simple rails api that always returns a ramdom greetings message.

๐Ÿ›  Built With

Tech Stack

Client
Server
Database

๐Ÿ’ป Getting Started

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

If you dont have Ruby installed on your computer, you can download it from here.

If you dont have Rails installed on your computer, you can download it from here.

If you dont have PostgreSQL installed on your computer, you can download it from here.

Prerequisites

  • Ruby: v3.1.2
  • Rails: v7.0.1
  • PostgreSQL: v14.5
  • React: v17.0.2

Setup

If you have installed git you can clone the code to your machine, or download a ZIP of all the files directly.

Download the ZIP from this location, or run the following git command to clone the files to your machine:

  • Once the files are on your machine, open the blog-app folder in your code editor. Run the following command in your terminal to install the required gems and run the application:

  • Open the config/database.yml file in the project directory and change the username and password to your PostgreSQL username and password. Edit the default section of the file to look like this:

  default: &default
  adapter: postgresql
  encoding: unicode
  # For details on connection pooling, see Rails configuration guide
  # http://guides.rubyonrails.org/configuring.html#database-pooling
  pool: <%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %>
  username: <your PostgreSQL role username>
  password: <your PostgreSQL role password>

Install

NOTE: You may need to run this command in the project directory to install the required gems and run the application:

bundle install

Usage

To run the project, execute the following command:

  1. Create the database with:
rails db:create
  1. Run the migrations with:
rails db:migrate
  1. Start the development server with:
rails server
  1. Open the app in your browser at http://localhost:3000

Run tests

To run tests, run the following command:

  bundle exec rspec

Deployment

You can deploy this project using:

  1. Deplay to Heroku
  git push heroku main
  1. Or deploy to Render
  git push render main

API Documentation

  • To get all greetings, send a GET request to the following URL:
  https://hellogreetings.onrender.com/api/v1/greetings.json

(back to top)

๐Ÿ‘ฅ Author

๐Ÿ‘ค Desmond Owusu Ansah

(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 a โญ๏ธ to this project.

(back to top)

๐Ÿ™ Acknowledgments

I would like to thanks everyone who support this project

(back to top)

๐Ÿ“ License

This project is MIT licensed.

NOTE: we recommend using the MIT license - you can set it up quickly by using templates available on GitHub. You can also use any other license if you wish.

(back to top)

hello-rails-back-end's People

Contributors

owusu-desmond avatar

Stargazers

RichmondAndoh avatar Donald Akite avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.