webmcp

diff doc/autodoc-header.htmlpart @ 439:29b1f7a04934

Updated documentation
author jbe
date Fri Feb 05 01:26:00 2016 +0100 (2016-02-05)
parents a932b94a8490
children 0221836a9db5
line diff
     1.1 --- a/doc/autodoc-header.htmlpart	Wed Jan 20 21:06:07 2016 +0100
     1.2 +++ b/doc/autodoc-header.htmlpart	Fri Feb 05 01:26:00 2016 +0100
     1.3 @@ -143,6 +143,15 @@
     1.4        </li>
     1.5      </ol>
     1.6      </p>
     1.7 +    <p>
     1.8 +      As a minimum configuration, the used configuration file or pre-fork initializer should at least contain a <tt>listen{...}</tt> call, e.g.:
     1.9 +    </p>
    1.10 +    <pre>
    1.11 +listen{
    1.12 +  { proto = "tcp", host = "::", port = 8080 },
    1.13 +  { proto = "tcp", host = "0.0.0.0", port = 8080 }
    1.14 +}
    1.15 +execute.inner()  -- if done in pre-fork initializer</pre>
    1.16      <h2>Using the atom library</h2>
    1.17      <p>
    1.18        Lua itself has only very few built-in data types. The atom library gives support for extra data types. Currently the following extra data types are provided:
    1.19 @@ -173,14 +182,14 @@
    1.20        The library &ldquo;mondelefant&rdquo; shipping with WebMCP can be used to access PostgreSQL databases. It also serves as an Object-Relational Mapper (ORM). The database connection is usually configured in the config file (e.g. in <tt>config/devel.lua</tt>):
    1.21      </p>
    1.22      <pre>
    1.23 -config.db = { engine="postgresql", dbname="webmcp_demo" }
    1.24 -config.db_trace = true</pre>
    1.25 +config.db = { engine="postgresql", dbname="webmcp_demo" }</pre>
    1.26      <p>
    1.27        In addition to configuring the database, it must be opened within a post-fork initializer (e.g. in <tt>app/_postfork/01_database.lua</tt>):
    1.28      </p>
    1.29      <pre>
    1.30  _G.db = assert(mondelefant.connect(config.db))
    1.31 -function mondelefant.class_prototype:get_db_conn() return db end</pre>
    1.32 +function mondelefant.class_prototype:get_db_conn() return db end
    1.33 +execute.inner()</pre>
    1.34      <p>
    1.35        The parameters for <tt>mondelefant.connect</tt> are directly passed to PostgreSQL's client library libpq. See <a href="http://www.postgresql.org/docs/9.4/static/libpq-connect.html">PostgreSQL's documentation on PQconnect</a> for information about supported parameters.
    1.36      </p>

Impressum / About Us