Read config, handle lastEventId in topicmanager

This commit is contained in:
2024-03-11 22:12:01 +01:00
parent 8cbd12ee61
commit 99b5710c59
8 changed files with 71 additions and 13 deletions

View File

@ -12,9 +12,20 @@ if (isset($opts['c'])) {
$config = Configuration::fromFile($opts['c']);
} else {
$config = Configuration::createDefault()
->addListener([
'address' => '127.0.0.1:8888',
'subscribe' => [
'anonymous' => true
]
])
->setAllowAnonymousSubscribe(true)
->setJwtSecret("!ChangeThisMercureHubJWTSecretKey!");
}
if (count($config->getListeners()) == 0) {
fwrite(STDERR, "No listeners available\n");
exit(1);
}
$daemon = new Daemon($config);
$daemon->start();