mirror of
https://github.com/notrab/dumbo.git
synced 2025-01-17 14:18:14 +01:00
19 lines
305 B
PHP
19 lines
305 B
PHP
<?php
|
|
|
|
require __DIR__ . "/vendor/autoload.php";
|
|
|
|
use Dumbo\Dumbo;
|
|
|
|
$app = new Dumbo();
|
|
|
|
$app->get("/", function ($context) {
|
|
$data = [
|
|
"message" => "Hello, Dumbo!",
|
|
"timestamp" => time(),
|
|
"items" => ["php", "dumbo"],
|
|
];
|
|
return $context->json($data);
|
|
});
|
|
|
|
$app->run();
|