Wiki Randomness!
This is an experiment in accessing the Wikipedia WikiMedia API via PHP. It loads a small amount of data about a few random Wikipedia pages, and displays it to the user.
Requirements
- Vagrant
- Oracle VM Virtualbox
- PHP (make sure php_openssl is also installed or composer cannot be installed)
- SSH
Setup Guide
- Clone this repository into a new directory
- Install Composer into the new directory
- Run
php composer.phar install
to download the Laravel Homestead dependency - If you don't have a personal SSH key set up, generate one with SSH
- Run
vagrant up
(the first time may take a while as it downloads the virtual machine image) - After it finishes, SSH into the server
ssh vagrant@127.0.0.1:2222
(password:vagrant
) and continue from step 2 of the For Production setup guide - The web page should now be accessable from http://localhost:8000
Requirements
- A webserver: Apache or nginx
- PHP >= 5.5.9 w/PDO extension installed
- A SQL database: MySQL, SQLite, Postgres, etc.
Setup Guide
- Clone this repository into a new directory
- cd into the new directory and run the following steps:
cd wikiroulette/site
- Install Composer here
curl -sS https://getcomposer.org/installer | php
php composer.phar install
cp .env.example .env
php artisan key:generate
- Set up your local database configuration in the file
.env
. You should also setAPP_DEBUG=false
if this were a real production environment php artisan migrate
to set up the database table
- (Production setup only) Set up your web server to serve files from the
wikiroulette/site/public
directory - The web page should now be accessable from the browser