amphp update
This commit is contained in:
parent
b5d97d9d75
commit
fd70f9e2ef
|
|
@ -8,12 +8,12 @@ use Amp\Http\Status;
|
||||||
use Amp\Socket\Server;
|
use Amp\Socket\Server;
|
||||||
use Psr\Log\NullLogger;
|
use Psr\Log\NullLogger;
|
||||||
|
|
||||||
// Run this script, then visit http://localhost:1337/ in your browser.
|
// Run this script, then visit http://localhost:80/ in your browser.
|
||||||
|
|
||||||
Amp\Loop::run(function () {
|
Amp\Loop::run(function () {
|
||||||
$sockets = [
|
$sockets = [
|
||||||
Server::listen("0.0.0.0:1337"),
|
Server::listen("0.0.0.0:80"),
|
||||||
Server::listen("[::]:1337"),
|
Server::listen("[::]:80"),
|
||||||
];
|
];
|
||||||
|
|
||||||
$server = new HttpServer($sockets, new CallableRequestHandler(function (Request $request) {
|
$server = new HttpServer($sockets, new CallableRequestHandler(function (Request $request) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue