A simple and vanilla php Rest CRUD with similar programming to emacs-personal for easy extents

saravia 5028490a96 upd 2 years ago
module 5028490a96 upd 2 years ago
.gitignore 81e16f1dc5 Initial commit 2 years ago
LICENSE 81e16f1dc5 Initial commit 2 years ago
README.md e0999df841 upd 2 years ago
favicon.ico ccb2aa4583 upd 2 years ago
index.php 99f4be233f upd 2 years ago
sha512.php 027b5f0630 upd 2 years ago
utils.php 5028490a96 upd 2 years ago

README.md

php-personal

Guide for ubuntu 22.04 (commin soon)

PHP Backend API Rest CRUD like emacs-personal for emacsens

Requeriments

  • php
  • php-pdo
  • mariadb-server
  • mariadb-client

and maybe you prefer enable 'errors' for development time

  • Put display_errors = On on file /etc/php/php.ini

Install a mysql db on your system

  • You need be root becose with doas or sudo not works the mariadb installation.
  • Note: user and libre will be replace by your user and group case in your machine.
    • apt install mariadb-server mariadb-client
    • mv /var/lib/mysql ~
    • mkdir -p /var/lib/mysql
    • chown user:libre /var/lib/mysql
    • mysql_install_db --user=mysql --basedir=/usr --datadir=/var/lib/mysql
    • service mariadb start
    • mysqladmin -u root password 1234
    • exit

For the next steps you dont need be root

Create a database

  • mysql -uroot -p (1234)
  • create database php_personal;
  • quit

  • for this example i use a database name but you can change if prefer but too indicate on index.php

Finally clone and run

  • git clone https://notabug.org/saravia/php-personal.git
  • php -S localhost:8080 -t php-personal

Scalable modules modes

Mode force scalabe every run

  • This mode force reinstall the hidden querys on all modules, removing and install again, is for development mode tables edition.

Mode install and use only

  • Too you can run one time with the exec uncomment and after finish run and install all the modules, you can comment the exec line for use only.

TODO

  • [] Duplicate users.
  • [] Rol superuser needed for update rols.
  • [*] Environment variables for install EV_php_name Environment php.
  • [] Temporally hash for be optional.
  • [] One client at time for be optional.
  • [] Restclient API test simulation for get a true when an endpoint works fine.
  • [] Remove class and put only functions