The website is currently being hosted on Heroku with a Laravel backend implementation and MySQL as the database. As such, backend developers will need to install PHP7, Composer, MySQL, and Git. Frontend developers will need to install PHP7, Composer, Node.js, NPM, and Git.
- For easy installation, it is recommend to install the GitHub Desktop Client for Mac and Windows Machines
- On Debian machines, running
sudo apt install git
should install the git CLI. As a note, you will need to authenticate your terminal by generating a token. Please refer to the GitHub Docs for details.
- Head to the official PHP download page and download the current stable PHP7 version. It is recommend to install the
VC15 x64 Thread Safe
version. - Extract the folder on your desktop. Rename it to
php7
- Rename the file
php.ini-development
tophp.ini
- Open the
php.ini
file in NotePad and changememory_limit
to1G
- Remove
;
for the following linesextension_dir = "ext"
,extension=curl
,extension=gd2
,extension=mbstring
,extension=openssl
,extension=pdo_mysql
,extension=sockets
andextension=pdo_sqlite
- Place the
php7
folder inC:\Program Files
- In the Windows Search, type in
system variables
and a Control Panel result should appear titledEdit the system environment variables
- Click
Environment Variables...
- Under
System Variables
click onPath
and then clickedit
. - Click
new
and enter in the boxC:\Program Files\php7
- Save your changes and exit the windows
- Open
command prompt
and verify installation by runningphp --verison
- Download the brew package manager for Mac
- Run in Terminal
brew install php
- Verify installation by running
php -v
- Open terminal and run the following command
sudo apt install php libapache2-mod-php
- Verify installation by running
php -v
- Install php-mysql package through apt as well:
sudo apt install php-mysql
- Download the mysql-installer-community (https://dev.mysql.com/downloads/installer/) (you don't need to make an account, you can just click "No thanks, just start my download")
- Open the installer and choose Developer Default as the Setup Type (should be defaulted to that)
- Click next and execute to install all the products
- When it's finally done, keep clicking next, all default options should be okay
- You may make your own Root Account Password
- Keep clicking Next/Execute
- Enter your password for the root account and check to make sure connection is successful, then continue through the installer until it's all finished
- In order to use the command "php artisan migrate" on the project, we have to add a monty_hall database. Open the MySQL Command Line Client and type in your password. Use the command "CREATE DATABASE monty_hall;" in the client. You can use the "SHOW DATABASES;" command to ensure that there is a monty_hall database. Lastly, make sure to change your .env file to include your root account password under "DB_PASSWORD". The "php artisan migrate" command should now work.
- Open the terminal and issue the following command:
sudo apt install mysql-server
- This will install the MySQL server package (you can use
apt info mysql-server
to see package into) - Verify the package is installed by running
mysql --version
- Download the brew package manager for Mac
- Run in Terminal
brew install mysql
- Verify the package is installed by running
mysql --version
- Download and run the composer install file
- When prompted, please check
Update this php.ini
- Open command prompt and test installation by running
composer
- Open the Monty-Hall Git Clone in command prompt (typically run
cd Documents\GitHub\Monty-Hall
) and runcomposer install --ignore-platform-reqs
- Open the terminal and run the following:
sudo apt install composer
- Check to see that composer was installed successfully:
composer --version
- CD to the Monty-Hall directory in terminal, and run
composer install
TBD
Make sure that the versions are Node.js 14.X.X and NPM 6.X.X. These can be installed with installers, by compiling from source, or with package managers.
Use either an installer (Windows or Mac) or the binaries or source code (Linux) from here to set up Node.js and NPM:
For instructions to download with a package manager instead, see here. Node.js and NPM should come together.
To verify that both have installed correctly, run the following commands;
node -v
This should print a variation of v14.X.X
npm -v
This should print a variation of 6.X.X
Laravel comes built-in with the ability to run a local webserver using just PHP. In order to run a local version of the website and see your changes, please clone the Git repository.
- Open the root file directory of the project using your terminal (
cd location\of\your\folder
) - Copy the file
.env.example
and rename it as.env
, make sure this file is hidden! - Run
composer install
to install required packages - Run
php aritsan generate:key
to generate a validAPP_KEY
- Run
npm install
to install NPM-related dependencies (for Laravel Mix) - Run
npm run dev
to compile front-end assets - Run
php artisan serve
to actually run the webserver. Use this command after setup.
Laravel has the most extensive and thorough documentation and video tutorial library of all modern web application frameworks, making it a breeze to get started with the framework.
If you don't feel like reading, Laracasts can help. Laracasts contains over 1500 video tutorials on a range of topics including Laravel, modern PHP, unit testing, and JavaScript. Boost your skills by digging into our comprehensive video library.
Open-sourced software licensed under the MIT license.