Application for listing products
- PHP 7.4
- MySQL (tested on 8.0.35)
clone repository
$ git clone https://github.com/MikusR/product-list.git
use Composer to get dependencies
$ composer install
copy .env.example to .env and configure access to database for example:
DBNAME = "swjd"
DBUSER = "root"
PASSWORD = "root"
HOST = "127.0.0.1"
PORT = 3377
DRIVER = "pdo_mysql"
create database
mysql> CREATE DATABASE swjd;
run migration (creates table and adds sample data)
php ./Migrate.php
run locally
php -S localhost:9876 -t ./public
or using apache (example apacheconf)
<VirtualHost *:80>
ServerAdmin admin@site1.your_domain
ServerName sjdtt.mikusr.info
DocumentRoot /var/ww/sjdtt.mikusr.info/public
<Directory /var/ww/sjdtt.mikusr.info/public>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Require all granted
</Directory>
ErrorLog ${APACHE_LOG_DIR}/sjdtt.mikusr.info_error.log
CustomLog ${APACHE_LOG_DIR}/sjdtt.mikusr.info_access.log combined
</VirtualHost>
Delete multiple products
You can add DVD
You can add Book
You can add Furniture
If a sku already exists
Negative price entered