mevdschee / php-crud-api

Single file PHP script that adds a REST API to a SQL database

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add prerequisites to examples

scriptPilot opened this issue · comments

As a proposal, it would be helpful to have the prerequisites (DB schema etc.) somewhere at the top as a comment. Now, by reading the code and try and error I can reproduce it but it can be improved:

Example

https://github.com/mevdschee/php-crud-api/blob/main/examples/clients/upload/vanilla.html

@mevdschee - if you think it is helpful, you can share this minimal JS Wrapper I have created for your incredible API :-)

https://github.com/scriptPilot/js-php-mysql-crud-api

DB schema

You can use any of the schemas provided in the tests/fixtures, see:

https://github.com/mevdschee/php-crud-api/tree/main/tests/fixtures

Cool - so it would be helpful to have a note in the script to these schema / tables which are required :-)