nitrogen / simple_bridge

A simple, standardized interface library to Erlang HTTP Servers.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add behavior which simply defines a handle(Req, Resp) function

jetztgradnet opened this issue · comments

The examples always contain the start/stop code for a single web server, so I still need to decide in my code, which webserver to use. What I would like to see is my code consisting of a handle(Req, Resp) function, which is called by some other module, ideally the request bridge. handle(Req, Resp) would then be the sole and web server independent entry point to my HTTP code.
A module similar to https://github.com/etnt/rebar_templates/blob/master/nitro_inets.erl could be part of simple_bridge, which adds the loopfunction for several web servers

simple bridge 2.0 will be doing this. https://github.com/nitrogen/simple_bridge/tree/ws