The purpose of this project is to create an API using Rails that will test for endpoints such as GET,POST,PUT,and DELETE. The project relies on the Rails API Project setup, creating a model with scopes to filter requests, and testing the given routes to ensure endpoints work effectively.
- PostgreSQL
- Ruby/Rails
- Postman
Request | Path | Parameters |
---|---|---|
GET All | http://localhost:3000/businesses | N/A |
GET By ID | http://localhost:3000/businesses/:id | :id # |
GET Random | http://localhost:3000/businesses?get_random=yes | N/A |
GET Searched Business | http://localhost:3000/businesses?name=TABLE | Business Name Ex: TABLE |
PUT | http://localhost:3000/businesses/:id | :id # |
POST | http://localhost:3000/businesses | Enter Key/Value pair |
DELETE | http://localhost:3000/businesses/:id | :id # |
- Clone this project into your Desktop directory
git clone https://github.com/DanJacobCodes/Business-Lookup-API
- In a separate terminal window launch postgres
postgres
- Bundle all gems to ensure that application dependencies are running. You may want to update the gems for good measure
bundle update
bundle install
- Change into this directory and create and initialize the database
cd Business-Lookup-API
rake db:create
rake db:migrate
rake db:seed
rake db:test:prepare
- To run the server and view the application run:
rails s
- Navigate to localhost:3000 in the browser of your choice
- HTML
- CSS
- Ruby
- Ruby on Rails
- PostgreSQL
- Postman
-
Ruby version 2.3.1
-
Rails version 5.1.2
Should any issues occur, contact me @dansamueljacob@gmail.com