Skip to content

GeoffreyOgembo/sinatra-backend

Repository files navigation

Phase 3 Sinatra Project

My Comic Book Database

Introduction

This is my backend application in which I set up an API with Sinatra and Active Record that can support my React frontend, which can be found here:

https://github.com/mitchellht34/phase-3-sinatra-react-project-frontend.git

Models

My goals was to set up my models in which, if I find a comic book character, I can see what series/books they star in. I find the best way to start reading comics is to pick a character you like and read that one through and you may find someone else you like through there. With my models set up in this way, I can show people what comics a certain character was in and will have a list of comics to show and where to start reading.

Getting Started

Backend Setup

This repository has all the code I used to get my Sinatra backend up and running. Fork and clone this repository to get started.

Then, run bundle install to install the gems.

The app/controllers/application_controller.rb file has an example GET route handler just so I can see that the application will actually run something when it first starts up.

You can start your server with:

$ bundle exec rake server

This will run your server on port http://localhost:9292.

Reccomending way to use the Data

  • If you would like to use the backend by itself, by all means, you are welcome to. However, it is recommended to use Postman to test your endpoints and practice making calls to the server.

  • Using binding.pry to debug your requests on the server is very helpful. As such, the pry gem has been included.

  • Use the Network Tab in the Dev Tools in the frontend to debug your requests if necessary.

Resources

License

MIT

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages