Skip to content

Instantly share code, notes, and snippets.

@rpip
Last active December 31, 2015 20:39
Show Gist options
  • Save rpip/8041457 to your computer and use it in GitHub Desktop.
Save rpip/8041457 to your computer and use it in GitHub Desktop.
An example webserver interface for Zotonic, similar to the File Service API.
-module(zotonic_demoserver_interface).
-behaviour(zotonic_webserver_interface).
-export([start/1, stop/0, restart/0]).
start(Config) ->
demoserver:start(Config).
stop() ->
demoserver:stop().
add_header({Name, Value}) ->
demoserver:add_header(Name, Value).
output_response(Content) ->
demoserver:start_response(Content).
@rpip
Copy link
Author

rpip commented Dec 19, 2013

The idea is to make it easy for Zotonic to easily switch/change the underlying web server.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment