hitagi-entrada/teste-swoole.php

14 lines
332 B
PHP

<?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();