File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -25,9 +25,10 @@ composer start
2525```
2626
2727Or you can use ` docker-compose ` to run the app with ` docker ` , so you can run these commands:
28-
29- cd [my-app-name]
30- docker-compose up -d
28+ ``` bash
29+ cd [my-app-name]
30+ docker-compose up -d
31+ ```
3132After that, open ` http://0.0.0.0:8080 ` in your browser.
3233
3334Run this command in the application directory to run the test suite
Original file line number Diff line number Diff line change 33
44use App \Application \Actions \User \ListUsersAction ;
55use App \Application \Actions \User \ViewUserAction ;
6+ use Psr \Http \Message \ResponseInterface as Response ;
7+ use Psr \Http \Message \ServerRequestInterface as Request ;
68use Slim \App ;
79use Slim \Interfaces \RouteCollectorProxyInterface as Group ;
810
911return function (App $ app ) {
1012 $ container = $ app ->getContainer ();
1113
14+ $ app ->get ('/ ' , function (Request $ request , Response $ response ) {
15+ $ response ->getBody ()->write ('Hello world! ' );
16+ return $ response ;
17+ });
18+
1219 $ app ->group ('/users ' , function (Group $ group ) use ($ container ) {
1320 $ group ->get ('' , ListUsersAction::class);
1421 $ group ->get ('/{id} ' , ViewUserAction::class);
Original file line number Diff line number Diff line change 2121 "monolog/monolog" : " ^1.24" ,
2222 "php" : " >=7.1" ,
2323 "php-di/php-di" : " ^6.0" ,
24- "slim/psr7" : " dev-master " ,
25- "slim/slim" : " ^4"
24+ "slim/psr7" : " ^0.5 " ,
25+ "slim/slim" : " ^4.1 "
2626 },
2727 "require-dev" : {
2828 "phpunit/phpunit" : " ^7.5"
Original file line number Diff line number Diff line change 1- version : ' 2 '
1+ version : ' 3.7 '
22
33volumes :
44 logs :
You can’t perform that action at this time.
0 commit comments