GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - scriptPilot/add-php-backend: Add PHP, Composer, MySQL, phpMyAdmin and PHP CRUD API to your local development environment.

BranchesTags
Open more actions menu

Latest commit

 

History

113 Commits
113 Commits

Folders and files

NameName
Last commit message
Last commit date
.github/workflows
.github/workflows
 
 
src
src
 
 
.gitignore
.gitignore
 
 
.npmignore
.npmignore
 
 
README.md
README.md
 
 
package-lock.json
package-lock.json
 
 
package.json
package.json
 
 

Repository files navigation

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

  • Run npm run backend to start the backend
  • 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 root and password root
  • Use the PHP CRUD API in frontend with /api.php

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

Resources

Readme
Activity

Stars

4 stars

Watchers

1 watching

Forks

1 fork
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.