hitagi-entrada/teste-swoole.php

14 lines
332 B
PHP
Raw Permalink Normal View History

2024-12-16 19:01:16 +00:00
<?php
require __DIR__ . '/vendor/autoload.php';
require __DIR__ . '/includes/wrapper-swoole.php';
use Swoole\Http\Server;
$server = new Server("0.0.0.0", 8073);
$server->on("request", function ($request, $response) {
$response->header("Content-Type", "text/plain");
$response->end("Hello, world!");
});
$server->start();