Skip to content

james-willis/button_pressr

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

buttonPressr

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.

Install

Prerequisites

On Ubuntu you'll need php7.x and composer. To install:

apt-get install php
apt-get install php-xml
apt-get install composer

Set up the project

Download the code and install dependencies:

git clone https://github.com/james-willis/button_pressr.git
cd button_pressr
composer install

Run the site

Start the web server:

php -S localhost:8000 -t web

Start the WebSocket server:

php socketServer.php

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published