diff options
author | Daniel Weipert <code@drogueronin.de> | 2023-11-22 16:33:01 +0100 |
---|---|---|
committer | Daniel Weipert <code@drogueronin.de> | 2023-11-22 16:33:01 +0100 |
commit | 95d1b9428f3fc97f92c463c50c2afd17a5b5444e (patch) | |
tree | 98b1e4a3c9c59033fe51f508dc3bd46652eacac1 /test | |
parent | 8bf926db1926665ad8a376971a6e35f33269b8d4 (diff) |
enhance local testing
Diffstat (limited to 'test')
-rw-r--r-- | test/index.php (renamed from test/router.php) | 0 | ||||
-rw-r--r-- | test/server.php | 16 |
2 files changed, 16 insertions, 0 deletions
diff --git a/test/router.php b/test/index.php index cead5ee..cead5ee 100644 --- a/test/router.php +++ b/test/index.php diff --git a/test/server.php b/test/server.php new file mode 100644 index 0000000..ec2a86a --- /dev/null +++ b/test/server.php @@ -0,0 +1,16 @@ +<?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(); |