All Projects → alwx → React Native Http Bridge

alwx / React Native Http Bridge

HTTP server for React Native

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to React Native Http Bridge

Foxy
Session-based Beast/Asio wrapper requiring C++14
Stars: ✭ 57 (-27.85%)
Mutual labels:  http-server
Aceql Http
AceQL HTTP is a framework of REST like http APIs that allow to access to remote SQL databases over http from any device that supports http.
Stars: ✭ 68 (-13.92%)
Mutual labels:  http-server
Streamit
This iOS app streams your camera so you can watch it in a simple web browser (MJPEG stream)
Stars: ✭ 74 (-6.33%)
Mutual labels:  http-server
Httpserver
A high performance, single threaded, HTTP server written in C++ as a learning tool. Uses kqueue for event management, therefore is MacOS / *BSD only!
Stars: ✭ 59 (-25.32%)
Mutual labels:  http-server
Titanium Web Proxy
A cross-platform asynchronous HTTP(S) proxy server in C#.
Stars: ✭ 1,122 (+1320.25%)
Mutual labels:  http-server
Merecat
Small and made-easy HTTP/HTTPS server based on Jef Poskanzer's thttpd
Stars: ✭ 69 (-12.66%)
Mutual labels:  http-server
Qtwebapp
QtWebApp is a HTTP server like Java servlets, written in C++ with the Qt framework.
Stars: ✭ 50 (-36.71%)
Mutual labels:  http-server
Suave
Suave is a simple web development F# library providing a lightweight web server and a set of combinators to manipulate route flow and task composition.
Stars: ✭ 1,196 (+1413.92%)
Mutual labels:  http-server
Brookfreepascal
The perfect Free Pascal framework for your web applications.
Stars: ✭ 64 (-18.99%)
Mutual labels:  http-server
Jennet
A simple HTTP web framework written in Pony
Stars: ✭ 72 (-8.86%)
Mutual labels:  http-server
Vtx clientserver
VTX Client / Server package.
Stars: ✭ 60 (-24.05%)
Mutual labels:  http-server
Http Server
A non-blocking HTTP application server for PHP based on Amp.
Stars: ✭ 1,122 (+1320.25%)
Mutual labels:  http-server
Akka Http
The Streaming-first HTTP server/module of Akka
Stars: ✭ 1,163 (+1372.15%)
Mutual labels:  http-server
Esp8266
This repository contains source code for the ESP8266.
Stars: ✭ 58 (-26.58%)
Mutual labels:  http-server
Gock
HTTP traffic mocking and testing made easy in Go ༼ʘ̚ل͜ʘ̚༽
Stars: ✭ 1,185 (+1400%)
Mutual labels:  http-server
Imgart
🎨 IMGART it's a simple, fast and reliable HTTP service for image processing based on filters and profiles
Stars: ✭ 55 (-30.38%)
Mutual labels:  http-server
Ydls
youtube-dl HTTP download and transcode service
Stars: ✭ 68 (-13.92%)
Mutual labels:  http-server
Nettygameserver
使用netty4.X实现的手机游戏分布式服务器,支持tcp,udp,http,websocket链接,采用protobuf自定义协议栈进行网络通信,支持rpc远程调用,使用mybatis3支持db存储分库分表,支持异步mysql存储,db保存时同步更新reids缓存。 使用ExcelToCode工程,将excel数据生成java类和json数据字典,DictService直接读取json,减少数据字典部分代码。使用game-executor工程,增加游戏内的异步事件全局服务, 支持事件sharding,均衡的异步执行事件逻辑
Stars: ✭ 1,203 (+1422.78%)
Mutual labels:  http-server
Envelop.c
🌊 Thread-less, event-loop based tiny http-server from scratch using epoll. Learning Purpose.
Stars: ✭ 75 (-5.06%)
Mutual labels:  http-server
Zio Tls Http
100% non-blocking, Java NIO only( inspired by zio-nio) , JSON HTTP server based on Scala ZIO library. Everything including TLS encryption modeled as ZIO effects, convenient route DSL similar to https4s, up to 30K TPS local JSON transaction with 25 threads on 6 cores(i7) with ZIO fibers.
Stars: ✭ 71 (-10.13%)
Mutual labels:  http-server

react-native-http-bridge

Simple HTTP server for React Native. Created for Status.im.

Since 0.5.0 supports and handles GET, POST, PUT and DELETE requests. The library can be useful for handling requests with application/json content type (and this is the only content type we support at the current stage) and returning different responses.

Since 0.6.0 can handle millions of requests at the same time and also includes some very basic support for React Native QT.

Install

npm install --save react-native-http-bridge

Automatically link

With React Native 0.27+

react-native link react-native-http-bridge

Example

First import/require react-native-http-server:

    var httpBridge = require('react-native-http-bridge');

Initalize the server in the componentWillMount lifecycle method. You need to provide a port and a callback.

    componentWillMount() {
      // initalize the server (now accessible via localhost:1234)
      httpBridge.start(5561, 'http_service' request => {

          // you can use request.url, request.type and request.postData here
          if (request.type === "GET" && request.url.split("/")[1] === "users") {
            httpBridge.respond(request.requestId, 200, "application/json", "{\"message\": \"OK\"}");
          } else {
            httpBridge.respond(request.requestId, 400, "application/json", "{\"message\": \"Bad Request\"}");
          }

      });
    }

Finally, ensure that you disable the server when your component is being unmounted.

  componentWillUnmount() {
    httpBridge.stop();
  }

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].