My favorites | Sign in
Project Logo
       
Search
for
Updated Sep 27, 2008 by justin.sheehy
WebmachineSetup  
Setting up a webmachine application.

For the fastest possible setup, read the quick start document.

(The webmachine_demo application is included as an example of a slightly more interesting starting place.)

You'll need a working Erlang/OTP install, preferably R12B3 or later. The webmachine and mochiweb beams must be on the erlang load path for your application to run, and the include path has to be such that -include_lib("webmachine/include/webmachine.hrl") will succeed.

A webmachine application is fairly standard with regard to supervisor setup and .app configuration. In the supervisor file (usually <appname>_sup.erl), the init/1 callback is the place to do your basic server configuration. We suggest using the webmachine demo supervisor file's init as a boilerplate, as you should only need to change the WebConfig term in that function. This term is a proplist expected to have entries for the keys [ip, port, log_dir, dispatch]. The first three are fairly self-explanatory, but DispatchConfiguration deserves its own explanation.

With the application configured, you should be able to start it like any other Erlang/OTP application.

Hosted by Google Code