scriptPilot / add-php-backend

Add PHP, Composer, MySQL, phpMyAdmin and PHP CRUD API to your local development environment.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add PHP Backend

Add 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.

Installation

  1. Install Docker and Node.js

  2. Create a new app project:

    npm create vite
  3. Add a PHP backend:

    npx add-php-backend

Usage

How it works

  • 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 folder
  • the package main script will create some files in the project folder if not exist:
    • docker/ folder with the Dockerfiles
    • public/api.php initialization of the PHP CRUD API
    • public/credentials.template.php to be renamed to credentials.php for production
    • composer.json to configure Composer
    • docker-composer.yml to configure the container setup
    • schema.sql contains the database schema and updates to it
    • testdata.sql contains test data only for development
  • the package main script will modify some files in your project folder:
    • add a backend script to the package.json file and prepend it to dev
    • add a proxy server config for PHP files to the Vite config file
    • add vendor/ and credentials.php to the .gitignore file

Support

Report bugs in the issues list.

Maintainer

  1. Apply changes
  2. Run npm run demo to build and start the demo-app
  3. Commit changes with an issue (closure) reference
  4. Run npm version patch | minor | major and push changes
  5. Let the workflow manage the release to GitHub and NPM

Maintainer

  1. Apply changes to the code
  2. Run npm run demo to build and start the demo-app
  3. Apply changes to the README.md file and screenshots
  4. Commit changes with an issue (closure) reference
  5. Run npm version patch | minor | major and push changes
  6. Let the workflow manage the release to GitHub and NPM

About

Add PHP, Composer, MySQL, phpMyAdmin and PHP CRUD API to your local development environment.


Languages

Language:JavaScript 57.7%Language:PHP 30.5%Language:Dockerfile 11.9%