mirror of
https://github.com/shlinkio/shlink.git
synced 2025-02-17 07:49:54 +03:00
26 lines
618 B
PHP
26 lines
618 B
PHP
<?php
|
|
|
|
return [
|
|
|
|
'routes' => [
|
|
[
|
|
'name' => 'home',
|
|
'path' => '/',
|
|
'middleware' => function ($req, $resp) {
|
|
$resp->getBody()->write('Hello world');
|
|
return $resp;
|
|
},
|
|
'allowed_methods' => ['GET'],
|
|
],
|
|
[
|
|
'name' => 'cli',
|
|
'path' => '/command-name',
|
|
'middleware' => function ($req, $resp) {
|
|
$resp->getBody()->write('Hello world from cli');
|
|
return $resp;
|
|
},
|
|
'allowed_methods' => ['CLI'],
|
|
],
|
|
],
|
|
|
|
];
|