RESTful Api in Ruby on Rails
A RESTful API in Ruby on Rails is a web application programming interface that adheres to the principles of Representational State Transfer (REST) and is built using the Ruby on Rails framework. REST is a set of constraints and principles for designing networked applications that use HTTP. In a RESTful API, resources are represented as URLs, and HTTP methods (GET, POST, PUT, DELETE, etc.) are used to perform operations on these resources.
Table of Contents
If you'd like to demo this API on your local machine:
- Ensure you have the prerequisites
- Clone this repo: `git clone git@github.com:Tinix/OT367-SERVER.git
- Navigate to the root folder: `cd OT367-SERVER
- Run:
bundle install
- Run:
rails db:{create,migrate}
- Inspect the
/db/schema.rb
and compare to the 'Schema' section below to ensure migration has been done successfully - Run:
rails s
- Visit http://localhost:3000/
- Ruby Version 3.2.2
- Rails Version 7.1.1
- Bundler Version 2.4.20
- RSpec Version 6.0
To test the entire spec suite, run bundle exec rspec
.
All tests should be passing.