Code examples for presentation server-sent events
Run via nginx
.idea |
.idea |
FROM php:7.2-apache | |
COPY . /var/www/html/ |
default: | |
golint *.go | |
go vet *.go | |
go fmt *.go | |
run: | |
go run naming.go | |
go run naming2.go | |
go run naming-unmarshal.go | |
go run naming-polymorphism.go |
FROM ubuntu:latest | |
RUN apt-get update && \ | |
apt-get install -y xvfb firefox python-pip xdotool x11vnc | |
RUN apt-get install -y wget | |
RUN wget https://github.com/mozilla/geckodriver/releases/download/v0.16.1/geckodriver-v0.16.1-linux64.tar.gz | |
RUN tar zxvf geckodriver-v0.16.1-linux64.tar.gz && mv geckodriver /usr/bin/geckodriver | |
ENV DISPLAY=:1.0 |
<?php | |
// Adapted from: https://github.com/ratchetphp/Pawl | |
require __DIR__ . '/vendor/autoload.php'; | |
$loop = React\EventLoop\Factory::create(); | |
$connector = new Ratchet\Client\Connector($loop); | |
// For example: ws://127.0.0.1:9222/devtools/page/6c98af2a-8944-4742-91d3-154cbd873ce2 |
Code examples for presentation server-sent events
Run via nginx
Code examples for presentation server-sent events
php -S 127.0.0.1:9001
Then open with browser: http://127.0.0.1:9001