Skip to content

A RESTful placeholder API based on the Prison Break series solely for the purpose of API integration testing.

License

Notifications You must be signed in to change notification settings

EmediongFrancis/Prison-Break-API

Repository files navigation

Prison Break API

This project was inspired by my fondness for the Prison Break Tv show...

Prison Break

This is a RESTful placeholder API based on the Prison Break series solely for the purpose of API integration testing.

Add a character.

To see the full project, visit this link.

To read about how I managed to build the project, visit this link. This project was built by Emediong ‘Bendito’ Francis, check him out on LinkedIn.

Installation

Installation is not exactly necessary for this REST API as it can be tested directly via instructions in the documentation online. But if you still want to test local installation, I will walk you through.

Prerequisites.

  • MySQL installed and configured with root as username and prisonbreak as password.
  • A CLI (Command Line Interface).
  • Knowledge of Linux terminal navigation.
  • Node installed.

Steps:

  • Clone the repository.
  • Switch to its directory.
  • Install necessary dependencies: npm install.
  • Start your MySQL server: sudo service mysql start.
  • Populate database with data: mysql -u root -p < backend/PrisonBreakAPI.sql.
  • Provide password (prisonbreak) when prompted for a password.
  • Start PrisonBreakServer: node PrisonBreakServer.js.

Your terminal should look like this:

┌──(emediongfrancis㉿benditos-pc)-[~/Prison-Break-API]
└─$ node PrisonBreakServer.js                   
Prison Break API 🚨 is listening on port 3000

  • Head to your browser and type in localhost:3000.

You should be greeted with the Welcome Page:

Landing Page

Usage

The endpoints for this API are:

  • /api/characters
  • /api/episodes
  • /api/locations
  • /api/codes

Endpoints

You can then query by id to isolate and manipulate further in your application. e.g: /api/episodes/5.

id Endpoints

Related Projects

Licensing

This project is free and open-source and is licensed under the BSD License.