summaryrefslogtreecommitdiff
path: root/docker/server/server.php
diff options
context:
space:
mode:
Diffstat (limited to 'docker/server/server.php')
-rw-r--r--docker/server/server.php19
1 files changed, 19 insertions, 0 deletions
diff --git a/docker/server/server.php b/docker/server/server.php
new file mode 100644
index 0000000..dee0cd8
--- /dev/null
+++ b/docker/server/server.php
@@ -0,0 +1,19 @@
+<?php
+
+use GeminiFoundation\Server;
+use GeminiFoundation\Server\RequestHandlers\DocumentServer;
+
+require __DIR__ . '/vendor/autoload.php';
+
+$server = new Server(
+ [
+ 'file' => __DIR__ . '/certificate/cert.pem',
+ 'key' => __DIR__ . '/certificate/key.rsa',
+ 'passphrase' => '',
+ ],
+ '0.0.0.0'
+);
+
+$server->onRequest(new DocumentServer(__DIR__ . '/content'));
+
+$server->listen();