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

@ -24,7 +24,8 @@
"phpunit/phpunit": "^4.8",
"squizlabs/php_codesniffer": "^2.3",
"roave/security-advisories": "dev-master",
"filp/whoops": "^2.0"
"filp/whoops": "^2.0",
"symfony/var-dumper": "^3.0"
},
"autoload": {
"psr-4": {

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

View File

@ -1,8 +1,6 @@
<?php
use Zend\Expressive\Application;
chdir(dirname(__DIR__));
/** @var Application $app */
$app = include 'config/app.php';
$app = include __DIR__ . '/../config/app.php';
$app->run();

View File

@ -43,9 +43,7 @@
</a>
</li>
<li>
<a href="{{ path('api.ping') }}">
Ping Test
</a>
</li>
</ul>
</div>