- Clone the repo
git clone https://github.com/jakbin/php_pdo_rest_api.git
- Then create database.
create a database name with "api".
create database api;
CREATE TABLE `apiTest`.`api` ( `id` INT NOT NULL AUTO_INCREMENT ,
`fname` TEXT NOT NULL ,
`lname` TEXT NOT NULL ,
PRIMARY KEY (`id`)) ENGINE = InnoDB;
Or
import "apiTest.sql" file into your database.
-
Start mysql server.
-
Start api server. s
php -S 127.0.0.1:8080 -t php_pdo_pdo_api/