shlink/config/autoload/routes.global.php
Alejandro Celaya f248d44e68 Improved config
2016-04-10 12:06:28 +02:00

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'],
],
],
];