Improved config

This commit is contained in:
Alejandro Celaya
2016-04-10 12:06:28 +02:00
parent 998a926c35
commit f248d44e68
5 changed files with 15 additions and 7 deletions

View File

@@ -2,6 +2,8 @@
use Zend\Expressive\Application;
use Zend\ServiceManager\ServiceManager;
chdir(dirname(__DIR__));
require __DIR__ . '/../vendor/autoload.php';
// Build container

View File

@@ -12,6 +12,15 @@ return [
},
'allowed_methods' => ['GET'],
],
[
'name' => 'cli',
'path' => 'command-name',
'middleware' => function ($req, $resp) {
$resp->getBody()->write('Hello world from cli');
return $resp;
},
'allowed_methods' => ['GET'],
],
],
];