amphp update

This commit is contained in:
Andrei Condurachi 2020-12-07 18:07:44 +02:00
parent b5d97d9d75
commit fd70f9e2ef
1 changed files with 3 additions and 3 deletions

View File

@ -8,12 +8,12 @@ use Amp\Http\Status;
use Amp\Socket\Server;
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 () {
$sockets = [
Server::listen("0.0.0.0:1337"),
Server::listen("[::]:1337"),
Server::listen("0.0.0.0:80"),
Server::listen("[::]:80"),
];
$server = new HttpServer($sockets, new CallableRequestHandler(function (Request $request) {