mirror of
https://github.com/shlinkio/shlink.git
synced 2024-11-29 01:18:59 +03:00
26 lines
617 B
PHP
26 lines
617 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' => ['GET'],
|
|
],
|
|
],
|
|
|
|
];
|