Skip to content

Commit

Permalink
Merge pull request #122 from slimphp/FixMultipleIssues
Browse files Browse the repository at this point in the history
Fix Multiple Issues
  • Loading branch information
l0gicgate committed Aug 18, 2019
2 parents 6a570ae + ec504de commit 778f26a
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 6 deletions.
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,10 @@ composer start
```

Or you can use `docker-compose` to run the app with `docker`, so you can run these commands:

cd [my-app-name]
docker-compose up -d
```bash
cd [my-app-name]
docker-compose up -d
```
After that, open `http://0.0.0.0:8080` in your browser.

Run this command in the application directory to run the test suite
Expand Down
7 changes: 7 additions & 0 deletions app/routes.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,19 @@

use App\Application\Actions\User\ListUsersAction;
use App\Application\Actions\User\ViewUserAction;
use Psr\Http\Message\ResponseInterface as Response;
use Psr\Http\Message\ServerRequestInterface as Request;
use Slim\App;
use Slim\Interfaces\RouteCollectorProxyInterface as Group;

return function (App $app) {
$container = $app->getContainer();

$app->get('/', function (Request $request, Response $response) {
$response->getBody()->write('Hello world!');
return $response;
});

$app->group('/users', function (Group $group) use ($container) {
$group->get('', ListUsersAction::class);
$group->get('/{id}', ViewUserAction::class);
Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
"monolog/monolog": "^1.24",
"php": ">=7.1",
"php-di/php-di": "^6.0",
"slim/psr7": "dev-master",
"slim/slim": "^4"
"slim/psr7": "^0.5",
"slim/slim": "^4.1"
},
"require-dev": {
"phpunit/phpunit": "^7.5"
Expand Down
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version: '2'
version: '3.7'

volumes:
logs:
Expand Down

0 comments on commit 778f26a

Please sign in to comment.