Partic- web 2 project
Continue from web 1 project. add backend with native PHP with react as frontend.
Installation
- Clone this repo to you xampp htdocs folder. it's should look like this
C:\xampp\htdocs\partic
. - Run ./partic.sql script for your database.
- Setup ./config.php to your needs.
- Start Xampp apache and mysql server. you can skip turning on mysql if you have mysql service running.
- Make you way to partic client directory using CLI.
$ cd C:\xampp\htdocs\partic\client
- Run command below
$ yarn install
$ yarn start
OR
$ npm install
$ npm start
- React dev server should be running on port 3000.
- so go to http://localhost:3000 on your brwoser.
You need to have yarn or npm and xampp installed on your machine. npm came inside nodejs installation. refer to this Node js and Yarn for installation. pick one of them. for xampp installation refer to this Xampp
Structure
/api/...
Restfull endpoints./lib/...
Library function./config.php
App configuration./sql/...
SQL script./client/
Frontend
Library
send()
http response plain/textjson()
http response jsonauthorize()
authorize userauthenticate()
authenticate user