SAE S3 BUT2
Repository for dealtonbut.app
On systemd based systems:
$ sudo systemctl start mariadb # Start Mariadb
$ sudo systemctl enable mariadb # Auto start Mariadb at bootupthen, once running:
$ mariadb
CREATE DATABASE DealTonBUT;
use DealTonBUT;
CREATE OR REPLACE USER 'guest'@'localhost' IDENTIFIED BY 'localPass';
GRANT SELECT, INSERT, UPDATE, DELETE ON *.* TO 'guest'@'localhost';
source [PATH_TO/structural_script.sql]In the php config file, found by doing php --ini, find the lines with extension=mysqli and extension=pdo_mysql and uncomment them.
You also need to install the php-mysql package. See your distribution's package manager for that.
At the root of the project:
$ cp .env.dist .env
$ vim .envThen fill up the information like such:
DB_HOSTNAME=localhost
DB_NAME=DealTonBUT
DB_USER=guest
DB_PASSWORD=localPass
Warning
Don't use such simple credentials in prod!
Note
The internal server should only be used for developping/testing. Production should have a proper webserver, like Apache or Nginx.
Execute this command at the root of the project:
php -S localhost:8080 index.php
The website is now running at http://localhost:8080