# HG changeset patch # User jbe # Date 1503365211 -7200 # Node ID 8c9bcfc22faa15b0a57899c2d7d61c87fbb7f8b2 # Parent 50746f1e8a43588e44df76de2fca4c53ec0173d1 Revised "Installation" section of documentation diff -r 50746f1e8a43 -r 8c9bcfc22faa doc/autodoc-header.htmlpart --- a/doc/autodoc-header.htmlpart Tue Aug 22 01:35:09 2017 +0200 +++ b/doc/autodoc-header.htmlpart Tue Aug 22 03:26:51 2017 +0200 @@ -95,8 +95,19 @@

Installation

- After downloading the tar.gz package, unpack it, enter the unpacked directory and type make. If you use Mac OS X or if you experience problems during compilation, you need to edit the Makefile.options file prior to compilation. The framework itself will be available in the framework/ directory, while a demo application is available in the demo-app/ directory. The framework.precompiled/ and demo-app.precompiled/ directories will contain a version with all Lua files being byte-code pre-compiled, which can be used instead. You may copy these directories (with cp -L to follow links) to any other place you like. Don't forget to setup a database, and make the tmp/ directory of the application writable for the user who executes WebMCP. Good luck and have fun! + Please read the following instructions carefully to avoid problems during installation.

+
    +
  1. Download and compile the Moonbridge Network Server for Lua Applications (follow the README file of Moonbridge).
  2. +
  3. Optional: Ensure that the moonbridge binary is within the search path for binaries.
  4. +
  5. Optional: Ensure that the moonbridge_http.lua file is covered by Lua's package path (see Lua's search path documentation on how to format the LUA_PATH environment variable).
  6. +
  7. Download WebMCP.
  8. +
  9. Enter WebMCP's unpacked source code directory and execute the command "make".
  10. +
  11. If you experience problems during step 3, edit the Makefile.options file and repeat step 3.
  12. +
  13. The framework/ directory (or the framework.precompiled directory if you want to use precompiled code) is WebMCP's framework base directory now. It may be copied to any other directory of your choice (but make sure to follow links, e.g. using cp -L -R, when copying the directory to a different place).
  14. +
  15. If optional step 3 has been skipped, ensure that Moonbridge's moonbridge_http.lua file is soft-linked or copied to the lib/ directory of the framework's base directory.
  16. + +

Configuration, initializers, and request handling

WebMCP uses the Moonbridge Network Server to handle HTTP requests. The Moonbridge Network Server listens to a TCP port and passes control to WebMCP by calling request.handler(...) for each request. However, before any request is processed, WebMCP will initialize the environment. This initialization includes tasks such as