All Projects → CapMousse → React Restify

CapMousse / React Restify

Licence: mit
A ReactPHP framework to create RESTfull api

Projects that are alternatives of or similar to React Restify

Mobile Security Framework Mobsf
Mobile Security Framework (MobSF) is an automated, all-in-one mobile application (Android/iOS/Windows) pen-testing, malware analysis and security assessment framework capable of performing static and dynamic analysis.
Stars: ✭ 10,212 (+11637.93%)
Mutual labels:  rest
Docusign Java Client
The Official DocuSign Java Client Library used to interact with the eSign REST API. Send, sign, and approve documents using this client.
Stars: ✭ 77 (-11.49%)
Mutual labels:  rest
Jsonapiframework
JsonApiFramework is a fast, extensible, and portable .NET framework for the reading and writing of JSON API documents. Currently working on ApiFramework 1.0 which is a new framework that supports the many enhancements documented in the 2.0 milestone of this project while being media type agnostic but will support media types like {json:api} and GraphQL for serialization/deserialization purposes.
Stars: ✭ 85 (-2.3%)
Mutual labels:  rest
Typerx
A lightweight typescript annotation rest based extra (express、 mongoose、 angular、zorro、ng-alain ...).
Stars: ✭ 76 (-12.64%)
Mutual labels:  rest
Queryql
Easily add filtering, sorting, and pagination to your Node.js REST API through your old friend: the query string!
Stars: ✭ 76 (-12.64%)
Mutual labels:  rest
Liberator
Liberator is a Clojure library for building RESTful applications.
Stars: ✭ 1,218 (+1300%)
Mutual labels:  rest
Starter Lapis
Cutting edge starter kit
Stars: ✭ 72 (-17.24%)
Mutual labels:  rest
Sample Dotnet Core Cqrs Api
Sample .NET Core REST API CQRS implementation with raw SQL and DDD using Clean Architecture.
Stars: ✭ 1,273 (+1363.22%)
Mutual labels:  rest
Restclient Cpp
C++ client for making HTTP/REST requests
Stars: ✭ 1,206 (+1286.21%)
Mutual labels:  rest
Evolutility Server Node
Model-driven REST or GraphQL backend for CRUD and more, written in Javascript, using Node.js, Express, and PostgreSQL.
Stars: ✭ 84 (-3.45%)
Mutual labels:  rest
Autorest
Auto RESTful Service Proxy Generator for GWT
Stars: ✭ 76 (-12.64%)
Mutual labels:  rest
Huobi golang
Go SDK for Huobi Spot API
Stars: ✭ 76 (-12.64%)
Mutual labels:  rest
Python Taiga
🌲 Python module for communicating with the Taiga API
Stars: ✭ 81 (-6.9%)
Mutual labels:  rest
Spring Boot Api Project Seed
🌱🚀一个基于Spring Boot & MyBatis的种子项目,用于快速构建中小型API、RESTful API项目~
Stars: ✭ 8,979 (+10220.69%)
Mutual labels:  rest
Accounts
Fullstack authentication and accounts-management for Javascript.
Stars: ✭ 1,266 (+1355.17%)
Mutual labels:  rest
Fluentlyhttpclient
Http Client for .NET Standard with fluent APIs which are intuitive, easy to use and also highly extensible.
Stars: ✭ 73 (-16.09%)
Mutual labels:  rest
The Complete Guide To Drf And Vuejs
📢 Source Code from my Web Dev Course *The Complete Guide To Django REST Framework and Vue JS* (Lang: English & Italian)
Stars: ✭ 78 (-10.34%)
Mutual labels:  rest
Camunda.api.client
Camunda REST API Client for .NET platform
Stars: ✭ 87 (+0%)
Mutual labels:  rest
Go Whatsapp Rest
Go WhatsApp Implementation in REST API
Stars: ✭ 86 (-1.15%)
Mutual labels:  rest
Spotifykit
Swift client for Spotify Web API
Stars: ✭ 84 (-3.45%)
Mutual labels:  rest

React-Restify

Scrutinizer Code Quality

RESTful api made easy for ReactPHP, seriously.

Instalation

Via composer

    $ composer require capmousse/react-restify

Create server

Here is an exemple of a simple HTTP server replying to all get call like http://127.0.0.1:1337/hello/you

require 'vendor/autoload.php';

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

// Middleware
$server->use(function ($request, $next) {
	print_r($request->getMethod());
	$next();
});

// Dependency injection
$server->add(\Foo\Bar::class)

$server->get('/hello/{name}', function ($request, $response, \Foo\Bar $bar, $name) {
    $response
    	->write("Hello {$name}")
    	->end();

    $bar->foobar();
});

$server->listen(1337);

To create a secure HTTPS server, you need to give all your cert files to the server :

$server->listen(1337, "[::1]", [
    'local_cert' => __DIR__ . 'localhost.pem'
]);

More examples can be found on the example directory like the Todo example.

Controller, Middleware and Dependency injection

React-Restify support Controller call, middleware à la express and Dependency Injection.

use CapMousse\ReactRestify\Http\Request;
use CapMousse\ReactRestify\Http\Response;

class Foo {
    public function bar() {
        echo "Do something";
    }
}

class FooBar {
    public function baz (Response $response, Foo $foo) {
        $foo->bar();
        $response->end()
    }
}

$server->add(Foo::class);

$server->use(function ($request, $next) {
    echo $request->httpRequest->getPath();
});

$server->get('/', '[email protected]');

Design goals

React-Restify was primary made to build RESTful api easily. It can be used like Silex or Express.

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

Licence

MIT, see LICENCE file

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].