Skip to content

Latest commit

 

History

History
51 lines (43 loc) · 1.44 KB

File metadata and controls

51 lines (43 loc) · 1.44 KB

Punk Records API: A One Piece API + Backend

How to Use

Setting up the database:

  1. Connect to the MySQL CLI and create a database (you will need to reflect your choices in setupDB() in db.go).
  2. Run the db/schema.sql script in the MySQL CLI.
  3. Run the db/inserts.sql script in the MySQL CLI.

Starting the web service:

  1. Open a new terminal.
  2. Navigate to /web-service and run go run . in your terminal.

Optionally, you can use my pre-made "tests":

  1. Create a virtual environment:
    python -m venv <venv_name>
  2. Activate the virtual environment.
  3. Install dependencies:
    pip install requests
  4. Run the tests:
    python test_the_api.py

The currently available routes are:

  • /characters
  • /characters/id
  • /devil_fruits
  • /devil_fruits/id
  • /locations
  • /locations/id
  • /artifacts
  • /artifacts/id