We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2f00678 commit 5061949Copy full SHA for 5061949
2 files changed
Procfile
@@ -1 +1 @@
1
-web: php bin/server.php --no-io --port=$PORT
+web: php bin/server.php --no-io --port=$PORT --host=0.0.0.0
bin/server.php
@@ -9,6 +9,7 @@
9
10
$noFsIO = false;
11
$port = 15155;
12
+$host = 'localhost';
13
14
foreach($argv AS $arg){
15
if($arg === '--no-io'){
@@ -19,6 +20,9 @@
19
20
if($name === '--port'){
21
$port = $value;
22
}
23
+ elseif($name === '--host'){
24
+ $host = $value;
25
+ }
26
27
28
@@ -54,8 +58,8 @@
54
58
55
59
$http->on('request', $handler);
56
60
57
-$socket->listen($port);
61
+$socket->listen($port, $host);
62
-echo "Started http server on {$port}\n";
63
+echo "Started http server on {$host}:{$port}\n";
64
65
$loop->run();
0 commit comments