-
Run .sql script into mysql database to create and fill tables.
-
Edit database.php with your database credencials.
-
run php server on cloned folder $ sudo php -S localhost:9000
-
Using Postman:
GET method: http://localhost:9000/api/post/read_single.php?id=3 http://localhost:9000/api/post/read.php
POST method: http://localhost:9000/api/post/create.php
e.g: { "title":"some title", "body":"lore ipsum...", ... }
PUT method: http://localhost:9000/api/post/update.php
e.g: { "title":"some other title ", "body":"lore ipsum xxx...", "id":3 ... }
DELETE method: http://localhost:9000/api/post/delete.php
e.g: { "id":3 }
Thank you for sharing.