2024-03-10 02:06:19 +00:00
|
|
|
#!/usr/bin/env php
|
|
|
|
<?php
|
|
|
|
|
|
|
|
use NoccyLabs\Mercureact\Configuration;
|
|
|
|
use NoccyLabs\Mercureact\Daemon;
|
|
|
|
|
|
|
|
require_once __DIR__."/../vendor/autoload.php";
|
|
|
|
|
2024-03-11 01:15:04 +00:00
|
|
|
$opts = getopt("c:");
|
|
|
|
|
|
|
|
if (isset($opts['c'])) {
|
|
|
|
$config = Configuration::fromFile($opts['c']);
|
|
|
|
} else {
|
|
|
|
$config = Configuration::createDefault()
|
|
|
|
->setAllowAnonymousSubscribe(true)
|
|
|
|
->setJwtSecret("!ChangeThisMercureHubJWTSecretKey!");
|
|
|
|
}
|
2024-03-10 02:06:19 +00:00
|
|
|
|
|
|
|
$daemon = new Daemon($config);
|
|
|
|
$daemon->start();
|