Create RESTful API with ReactPHP

Installs: 178

Dependents: 0

Stars: 44

Watchers: 6

Forks: 7

Open Issues: 1

0.2.0 2014-04-04 10:29 UTC


Scrutinizer Code Quality

RESTful api made easy for ReactPHP, seriously.


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