PHP code example of ernestdefoe / parley

1. Go to this page and download the library: Download ernestdefoe/parley library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

ernestdefoe / parley example snippets


'websocket' => [
    'server-host' => '0.0.0.0',
    'server-port' => 6001,

    // What browsers connect to: your forum's own hostname, on 443, secure.
    'js-client-host' => 'forum.example.com',
    'js-client-port' => 443,
    'js-client-secure' => true,

    // What PHP connects to: the server itself, plain.
    'php-client-host' => '127.0.0.1',
    'php-client-port' => 6001,
    'php-client-secure' => false,
],
bash
composer igrate
php flarum extension:enable ernestdefoe-parley
php flarum cache:clear
nginx
location /app/ {
    proxy_pass http://127.0.0.1:6001;
    proxy_http_version 1.1;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection "Upgrade";
    proxy_set_header Host $host;
    proxy_read_timeout 3600s;
}
bash
php flarum extension:disable ramon-chat
php flarum migrate:reset --extension=ramon-chat
composer remove ramon/chat