/slim-bookshelf-api

A simple API written in Slim Framework

Primary LanguagePHPBSD 3-Clause "New" or "Revised" LicenseBSD-3-Clause

Slim Bookshelf API

A simple Slim Framework API.

Branches

  • slim3 for a Slim 3 version with OAuth and a website.
  • slim4 for a Slim 4 version with both HTTP and a GraphQL APIs.

Install

  1. Run the migrations:

     $ composer migrate
    
  2. Load the api/db/fixtures/default.sql into your database:

     $ cat api/db/fixtures/default.sql | sqlite3 api/db/bookshelf.db
    
  3. Run the API:

     $ php -S 0.0.0.0:8888 -t public/
    
  4. Access the API:

    • HTTP: http://localhost:8888/authors - JSON-API compatible
    • GraphQL: http://localhost:8888/graphql - GraphiQL/Postman/Paw compatible for exploration