Create RESTful API with ReactPHP

0.3.0 2016-01-08 10:52 UTC

This package is not auto-updated.

Last update: 2022-08-02 09:08:37 UTC


#React-Restify Scrutinizer Code Quality

RESTful api made easy for ReactPHP, seriously.

##Instalation In your composer.json

"require"       : {
    "capmousse/react-restify": "dev-master"

##Create server

Here is an exemple of a simple HTTP server replying to all get call like

require 'vendor/autoload.php';

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

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

$runner = new CapMousse\ReactRestify\Runner($server);

More examples can be found on the example directory like the Todo example, the most complete

Design goals

React-Restify was primary made to build RESTful api easily. It can be used like Silex, but without the framework part.

Next part will be to support Sockets, Upgrade Requests... to create a real time API server.


MIT, see LICENCE file