-
Notifications
You must be signed in to change notification settings - Fork 1k
Home
Maurits van der Schee edited this page Apr 16, 2017
·
91 revisions
Welcome to the Wiki
- Permissions on filters (disallow filters when key is missing?)
- Order on diff functions: diff(numeric), dist(geo), diff(date)
- Security better explained (csrf, cors)
- Test case for NaN float
- Detect DB version to adjust tests for features "binary", "spatial" and (in the future) "json".
- Upsert support on edit
- Proxy for set of API's
- Multi-schema support (as alternative for multi-database)
- Travis integration
- Some form of JWT token support (see: https://github.com/mevdschee/php-api-auth)
- Port to .net core (C#) (see: https://github.com/mevdschee/core-data-api)
- Port to .net (C#) (see: https://github.com/mevdschee/data-api-dot-net)
- Port to Go (see: https://github.com/mevdschee/go-crud-api)
- Port to Java (see: https://github.com/mevdschee/java-crud-api)
- Port to NodeJs (see: https://github.com/mevdschee/js-crud-api)
- Stored procedure API (see: https://github.com/mevdschee/php-sp-api)
- PHP CRUD application (see: https://github.com/mevdschee/php-crud-ui)
- Vue.js CRUD application (see: https://github.com/mevdschee/vue-crud-ui)
General tips
Use virtualbox and set your network interface to bridged
apt-get install openssh-server
sudo nano /etc/sysctl.conf
net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1
net.ipv6.conf.lo.disable_ipv6 = 1
net.ipv6.conf.eth0.disable_ipv6 = 1
reboot
Ubuntu 12/14/16
#Use mini.iso
#Choose LAMP+PostgreSQL packages
sudo apt-get install nano git sqlite3
sudo apt-get install php-dom php-zip (ubuntu 16 only)
sudo apt-get install php5-sqlite php5-pgsql (ubuntu 12/14 only)
sudo apt-get install php7.0-sqlite php-pgsql (ubuntu 16 only)
git clone https://github.com/mevdschee/php-crud-api.git
cd php-crud-api
sudo su postgres
psql
CREATE DATABASE "php-crud-api";
CREATE USER "php-crud-api" WITH PASSWORD 'php-crud-api';
GRANT ALL PRIVILEGES ON DATABASE "php-crud-api" TO "php-crud-api";
\q
exit
mysql -uroot -proot
CREATE DATABASE `php-crud-api`;
CREATE USER 'php-crud-api'@'localhost' IDENTIFIED BY 'php-crud-api';
GRANT ALL PRIVILEGES ON `php-crud-api`.* TO 'php-crud-api'@'localhost';
FLUSH PRIVILEGES;
exit
cp tests/Config.php.dist tests/Config.php
nano tests/Config.php
'MySQL' => array(
'hostname' => 'localhost',
'username' => 'php-crud-api',
'password' => 'php-crud-api',
'database' => 'php-crud-api',
),
'PostgreSQL' => array(
'hostname' => 'localhost',
'username' => 'php-crud-api',
'password' => 'php-crud-api',
'database' => 'php-crud-api',
),
'SQLite' => array(
'hostname' => '',
'username' => '',
'password' => '',
'database' => 'tests/sqlite.db',
),
/* Uncomment and update for any databases you want to use.
wget https://getcomposer.org/composer.phar
php composer.phar install
vendor/phpunit/phpunit/phpunit
Debian 7/8
#Use netinst.iso
#Choose nothing but system tools
su
apt-get install postgresql mysql-server sqlite3
apt-get install php5-cli php5-sqlite php5-pgsql php5-mysqlnd
apt-get install nano git
su postgres
psql
CREATE DATABASE "php-crud-api";
CREATE USER "php-crud-api" WITH PASSWORD 'php-crud-api';
GRANT ALL PRIVILEGES ON DATABASE "php-crud-api" TO "php-crud-api";
\q
exit
mysql -uroot -proot
CREATE DATABASE `php-crud-api`;
CREATE USER 'php-crud-api'@'localhost' IDENTIFIED BY 'php-crud-api';
GRANT ALL PRIVILEGES ON `php-crud-api`.* TO 'php-crud-api'@'localhost';
FLUSH PRIVILEGES;
exit
exit
git clone https://github.com/mevdschee/php-crud-api.git
cd php-crud-api
cp tests/Config.php.dist tests/Config.php
nano tests/Config.php
'MySQL' => array(
'hostname' => 'localhost',
'username' => 'php-crud-api',
'password' => 'php-crud-api',
'database' => 'php-crud-api',
),
'PostgreSQL' => array(
'hostname' => 'localhost',
'username' => 'php-crud-api',
'password' => 'php-crud-api',
'database' => 'php-crud-api',
),
'SQLite' => array(
'hostname' => '',
'username' => '',
'password' => '',
'database' => 'tests/sqlite.db',
),
/* Uncomment and update for any databases you want to use.
wget https://getcomposer.org/composer.phar
php composer.phar install
vendor/phpunit/phpunit/phpunit
Centos 6/7
#Use minimal.iso (not netinst.iso)
useradd maurits
passwd maurits
su
vi /etc/sysconfig/network-scripts/ifcfg-e*
ONBOOT="yes"
NM_CONTROLLED="no" (centos 6 only)
yum install nano git wget
yum install php-cli php-sqlite3 php-pgsql php-mysqli php-dom
yum install sqlite postgresql postgresql-server postgresql-contrib
yum install mysql-server (centos 6 only)
yum install mariadb-server (centos 7 only)
chkconfig mysqld on (centos 6 only)
service mysqld start (centos 6 only)
systemctl enable mariadb (centos 7 only)
systemctl start mariadb (centos 7 only)
mysql_secure_installation
chkconfig postgresql on (centos 6 only)
service postgresql initdb (centos 6 only)
service postgresql start (centos 6 only)
systemctl enable postgresql (centos 7 only)
postgresql-setup initdb (centos 7 only)
systemctl start postgresql (centos 7 only)
nano /var/lib/pgsql/data/pg_hba.conf
#replace 'ident' by 'md5' (for 'host' not for 'local')
/etc/init.d/postgresql restart (centos 6 only)
systemctl restart postgresql (centos 7 only)
su postgres
psql
CREATE DATABASE "php-crud-api";
CREATE USER "php-crud-api" WITH PASSWORD 'php-crud-api';
GRANT ALL PRIVILEGES ON DATABASE "php-crud-api" TO "php-crud-api";
\q
exit
mysql -uroot -proot
CREATE DATABASE `php-crud-api`;
CREATE USER 'php-crud-api'@'localhost' IDENTIFIED BY 'php-crud-api';
GRANT ALL PRIVILEGES ON `php-crud-api`.* TO 'php-crud-api'@'localhost';
FLUSH PRIVILEGES;
exit
exit
git clone https://github.com/mevdschee/php-crud-api.git
cd php-crud-api
cp tests/Config.php.dist tests/Config.php
nano tests/Config.php
'MySQL' => array(
'hostname' => 'localhost',
'username' => 'php-crud-api',
'password' => 'php-crud-api',
'database' => 'php-crud-api',
),
'PostgreSQL' => array(
'hostname' => 'localhost',
'username' => 'php-crud-api',
'password' => 'php-crud-api',
'database' => 'php-crud-api',
),
'SQLite' => array(
'hostname' => '',
'username' => '',
'password' => '',
'database' => 'tests/sqlite.db',
),
/* Uncomment and update for any databases you want to use.
wget https://getcomposer.org/composer.phar
php composer.phar install
vendor/phpunit/phpunit/phpunit