Code Monkey home page Code Monkey logo

slim-bookshelf-api's Introduction

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

slim-bookshelf-api's People

Contributors

akrabat avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

slim-bookshelf-api's Issues

README example issues

Probably worth mentioning the migrations only run in the API directory, also the fixtures seem to be broken:

$: cat api/db/fixtures/default.sql | sqlite3 api/db/bookshelf.db
Error: near line 129: NOT NULL constraint failed: oauth_clients.redirect_uri
Error: near line 135: NOT NULL constraint failed: oauth_clients.redirect_uri

Note, I'm just putting this down here quickly as its super late, will tidy later

Problem with /token endpoint

If I use the /token endpoint for a second time, after the returned access token has expired, I get an error (I use the mysql driver): Integrity constraint violation: 1062 Duplicate entry 'xxx' for key 'PRIMARY'" I don't know if this is a bug, or expected behaviour?
Perhaps I should use the refresh token to get a new token, but how?

Thanks Mark.

Mysql

how do i make this framework work with mysql?

addMessage() on null

when logging in , i received te following error

Type: Error
Message: Call to a member function addMessage() on null
File: /slim-bookshelf-api/web/src/App/Action/LoginAction.php
Line: 36
LoginAction.php : Line 36

$this->flash->addMessage('error', "Failed to log in: " . $e->getMessage());

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.