summaryrefslogtreecommitdiff
path: root/server.php
diff options
context:
space:
mode:
Diffstat (limited to 'server.php')
-rw-r--r--server.php19
1 files changed, 19 insertions, 0 deletions
diff --git a/server.php b/server.php
new file mode 100644
index 0000000..2e54925
--- /dev/null
+++ b/server.php
@@ -0,0 +1,19 @@
+<?php
+
+use Ratchet\Server\IoServer;
+use Ratchet\Http\HttpServer;
+use Ratchet\WebSocket\WsServer;
+use App\Ratchet\Chat;
+
+require 'vendor/autoload.php';
+
+$server = IoServer::factory(
+ new HttpServer(
+ new WsServer(
+ new Chat()
+ )
+ ),
+ 8080
+);
+
+$server->run();