api.emotionhero.com/bin/socket_server.php

26 lines
No EOL
485 B
PHP

<?php
chdir(__DIR__);
// define('APPLICATION_ENV', 'development');
require_once __DIR__ . "/../bootstrap.php";
error_reporting(E_ALL);
ini_set('display_errors',1);
// Show table creation statements
// And (re)generate Proxies
use Ratchet\WebSocket\WsServer;
use Ratchet\Http\HttpServer;
use Ratchet\Server\IoServer;
$server = IoServer::factory(
new HttpServer(
new WsServer(
new EmotionHero\Server\Websockets()
)
),
8181
);
$server->run();