mirror of
https://github.com/notrab/dumbo.git
synced 2025-01-17 22:28:25 +01:00
22 lines
401 B
PHP
22 lines
401 B
PHP
<?php
|
|
|
|
require __DIR__ . "/vendor/autoload.php";
|
|
|
|
use Dumbo\Dumbo;
|
|
use Dumbo\Helpers\Compress;
|
|
|
|
$app = new Dumbo();
|
|
|
|
$app->use(
|
|
Compress::compress([
|
|
"threshold" => 1024, // Minimum size to compress (bytes)
|
|
"encoding" => "gzip", // Preferred encoding (gzip or deflate)
|
|
])
|
|
);
|
|
|
|
$app->get("/", function ($c) {
|
|
return $c->json(["message" => "Hello, Dumbo!"]);
|
|
});
|
|
|
|
$app->run();
|