mirror of
https://github.com/notrab/dumbo.git
synced 2025-01-17 06:08:31 +01:00
17 lines
294 B
PHP
17 lines
294 B
PHP
<?php
|
|
|
|
require __DIR__ . "/vendor/autoload.php";
|
|
|
|
use Dumbo\Dumbo;
|
|
use Dumbo\Helpers\BasicAuth;
|
|
|
|
$app = new Dumbo();
|
|
|
|
$app->use(BasicAuth::basicAuth("user:password"));
|
|
|
|
$app->get("/", function ($context) {
|
|
return $context->html("<h1>Welcome to the protected area!</h1>");
|
|
});
|
|
|
|
$app->run();
|