Add [PHP](https://www.php.net/), [Composer](https://getcomposer.org/), [MySQL](https://mariadb.org/), [phpMyAdmin](https://www.phpmyadmin.net/) and [PHP CRUD API](https://github.com/mevdschee/php-crud-api) to your local development environment.
npm install add-php-backendAdd PHP, Composer, MySQL, phpMyAdmin and PHP CRUD API to your local development environment.
You might be interested in a simple Synchronization between local IndexedDB and MySQL Database.
2. Create a new app project:
``bash`
npm create vite
3. Add a PHP backend:
`bash`
npx add-php-backend
- Run npm run backend to start the backendroot
- Open the PHP server at http://localhost:8000
- API endpoint at http://localhost:8000/api.php
- example: http://localhost:8000/api.php/records/tasks
- Open phpMyAdmin at http://localhost:8080
- Login with username and password root/api.php
- Use the PHP CRUD API in frontend with
- no dependency will be added to the repository
- you have full control of all source files for fine tuning
- running npx add-php-backend will download the package in a cache folderdocker/
- the package main script will create some files in the project folder if not exist:
- folder with the Dockerfilespublic/api.php
- initialization of the PHP CRUD APIpublic/credentials.template.php
- to be renamed to credentials.php for productioncomposer.json
- to configure Composerdocker-composer.yml
- to configure the container setupschema.sql
- contains the database schema and updates to ittestdata.sql
- contains test data only for developmentbackend
- the package main script will modify some files in your project folder:
- add a script to the package.json file and prepend it to devvendor/
- add a proxy server config for PHP files to the Vite config file
- add and credentials.php to the .gitignore file
Report bugs in the issues list.
1. Apply changes
2. Run npm run demo to build and start the demo-appnpm version patch | minor | major
3. Commit changes with an issue (closure) reference
4. Run and push changes
5. Let the workflow manage the release to GitHub and NPM
1. Apply changes to the code
2. Run npm run demo to build and start the demo-appREADME.md
3. Apply changes to the file and screenshotsnpm version patch | minor | major` and push changes
4. Commit changes with an issue (closure) reference
5. Run
6. Let the workflow manage the release to GitHub and NPM