20 lines
458 B
PHP
Executable File
20 lines
458 B
PHP
Executable File
#!/usr/bin/env php
|
|
<?php
|
|
|
|
use NoccyLabs\Mercureact\Configuration;
|
|
use NoccyLabs\Mercureact\Daemon;
|
|
|
|
require_once __DIR__."/../vendor/autoload.php";
|
|
|
|
$opts = getopt("c:");
|
|
|
|
if (isset($opts['c'])) {
|
|
$config = Configuration::fromFile($opts['c']);
|
|
} else {
|
|
$config = Configuration::createDefault()
|
|
->setAllowAnonymousSubscribe(true)
|
|
->setJwtSecret("!ChangeThisMercureHubJWTSecretKey!");
|
|
}
|
|
|
|
$daemon = new Daemon($config);
|
|
$daemon->start(); |