summaryrefslogtreecommitdiff
path: root/test/server.php
diff options
context:
space:
mode:
authorDaniel Weipert <code@drogueronin.de>2023-11-12 11:16:56 +0100
committerDaniel Weipert <code@drogueronin.de>2023-11-20 17:30:04 +0100
commit6df3d321d9b67c4541f50158b087d37c4b22e886 (patch)
tree06031988bb4b957b76f051af366ced448a48545f /test/server.php
initial commit
Diffstat (limited to 'test/server.php')
-rw-r--r--test/server.php18
1 files changed, 18 insertions, 0 deletions
diff --git a/test/server.php b/test/server.php
new file mode 100644
index 0000000..c90942a
--- /dev/null
+++ b/test/server.php
@@ -0,0 +1,18 @@
+<?php
+
+use GeminiFoundation\Server;
+use GeminiFoundation\Server\RequestHandlers\DocumentServer;
+
+require dirname(__DIR__) . '/vendor/autoload.php';
+
+$server = new Server(
+ [
+ 'file' => __DIR__ . '/cert.pem',
+ 'key' => __DIR__ . '/key.rsa',
+ 'passphrase' => '',
+ ],
+);
+
+$server->onRequest(new DocumentServer(__DIR__));
+
+$server->listen();