Add command, query, stable server with argument parsing

This commit is contained in:
2020-06-20 18:07:43 +02:00
parent 3b8438f9e7
commit ae7f92d51d
12 changed files with 197 additions and 159 deletions

10
server Executable file
View File

@@ -0,0 +1,10 @@
#!/usr/bin/env php
<?php
require_once __DIR__ . '/src/FileServer.php';
$dir = ($argv[1] ?? __DIR__ . '/var/documents');
$commandEndpoints = ['ipc:///tmp/storage_server_command.ipc'];
$queryEndpoints = ['ipc:///tmp/storage_server_query.ipc'];
(new FileServer($dir, new ZMQContext(), $commandEndpoints, $queryEndpoints))->run();