PHP code example of brenodouglas / react-restify

1. Go to this page and download the library: Download brenodouglas/react-restify library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

brenodouglas / react-restify example snippets




$server = new CapMousse\ReactRestify\Server("MyAPP", "0.0.0.1");

$server->get('/hello/{name}', function ($request, $response, $next) {
    $response->write("Hello ".$request->name);
    $next();
});

$runner = new CapMousse\ReactRestify\Runner($server);
$runner->listen(1337);