Read config, handle lastEventId in topicmanager
This commit is contained in:
		@@ -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();
 | 
			
		||||
		Reference in New Issue
	
	Block a user