A simple website that demonstrates some php basics.
This app is a simple example of using WebSockets in php with the Ratchet library. The site is a single page app that shows all active users who has pressed the button since they've loaded the page. The idea for this site was inspired by a recent post on reddit's /r/node community.
On Ubuntu you'll need php7.x and composer. To install:
apt-get install php
apt-get install php-xml
apt-get install composer
Download the code and install dependencies:
git clone https://github.com/james-willis/button_pressr.git
cd button_pressr
composer install
Start the web server:
php -S localhost:8000 -t web
Start the WebSocket server:
php socketServer.php