Last active
December 31, 2015 20:39
-
-
Save rpip/8041457 to your computer and use it in GitHub Desktop.
An example webserver interface for Zotonic, similar to the File Service API.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-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). |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The idea is to make it easy for Zotonic to easily switch/change the underlying web server.