Skip to content

Commit a230936

Browse files
committed
Start sever when invoked with php server.php
1 parent 9bb89c5 commit a230936

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

server.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
<?php
2+
if(isset($_SERVER['argv'][0]) && $_SERVER['argv'][0] === 'server.php') {
3+
exec('php -S localhost:3000 -t public server.php');
4+
}
5+
26
$comments = file_get_contents('_comments.json');
37
switch($_SERVER["REQUEST_URI"]) {
48
case '/':

0 commit comments

Comments
 (0)