Browse Source

fixed typo's + debug config in launch.json file

main
Ramdan Katakpawou 2 years ago
parent
commit
a383a7f1dd
2 changed files with 50 additions and 3 deletions
  1. 47
    0
      .vscode/launch.json
  2. 3
    3
      public/index.php

+ 47
- 0
.vscode/launch.json View File

@@ -0,0 +1,47 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Listen for Xdebug",
"type": "php",
"request": "launch",
"port": 9003,
"pathMappings": { "/src": "${workspaceRoot}" }
},
{
"name": "Launch currently open script",
"type": "php",
"request": "launch",
"program": "${file}",
"cwd": "${fileDirname}",
"port": 0,
"runtimeArgs": ["-dxdebug.start_with_request=yes"],
"env": {
"XDEBUG_MODE": "debug,develop",
"XDEBUG_CONFIG": "client_port=${port}"
}
},
{
"name": "Launch Built-in web server",
"type": "php",
"request": "launch",
"runtimeArgs": [
"-dxdebug.mode=debug",
"-dxdebug.start_with_request=yes",
"-S",
"localhost:0"
],
"program": "",
"cwd": "${workspaceRoot}",
"port": 9003,
"serverReadyAction": {
"pattern": "Development Server \\(http://localhost:([0-9]+)\\) started",
"uriFormat": "http://localhost:%s",
"action": "openExternally"
}
}
]
}

+ 3
- 3
public/index.php View File

@@ -18,8 +18,8 @@ $app->get('/', function (Request $request, Response $response, array $args) {
return $response;
});

$app->get('/blog{slug}', function (Request $request, Response $response, array $args) {
$response->getBody()->write("Blog");
$app->get('/blog/{slug}', function (Request $request, Response $response, array $args) {
$response->getBody()->write("Blog met slug");
return $response;
});

@@ -28,7 +28,7 @@ $app->post('/login', function (Request $request, Response $response, array $args
return $response;
});

$app->post('/postcommemt', function (Request $request, Response $response, array $args) {
$app->post('/postcomment', function (Request $request, Response $response, array $args) {
$response->getBody()->write("Post comment");
return $response;
});

Loading…
Cancel
Save