Skip to content

Commit 2945ece

Browse files
committed
Indentation + better startup message
1 parent 094d32c commit 2945ece

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

server.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
isset($_SERVER['argv'][0]) && $_SERVER['argv'][0] === 'server.php';
44

55
if($scriptInvokedFromCli) {
6-
echo 'server listening on port 3000';
6+
echo 'starting server on port 3000' . PHP_EOL;
77
exec('php -S localhost:3000 -t public server.php');
88
} else {
99
return routeRequest();
@@ -20,7 +20,7 @@ function routeRequest()
2020
if($_SERVER['REQUEST_METHOD'] === 'POST') {
2121
$commentsDecoded = json_decode($comments, true);
2222
$commentsDecoded[] = ['author' => $_POST['author'],
23-
'text' => $_POST['text']];
23+
'text' => $_POST['text']];
2424

2525
$comments = json_encode($commentsDecoded);
2626
file_put_contents('_comments.json', $comments);

0 commit comments

Comments
 (0)