webmcp
view demo-app/config/demo.lua @ 404:b42a6c9cc322
Fixed syntax error in autodoc documentation of mondelefant.connect{...}
| author | jbe | 
|---|---|
| date | Wed Jan 06 02:53:14 2016 +0100 (2016-01-06) | 
| parents | a2c733535b8e | 
| children | f5d2d0ccb94a | 
 line source
     1 -- uncomment the following two lines to use C implementations of chosen
     2 -- functions and to disable garbage collection during the request, to
     3 -- increase speed:
     4 --
     5 -- require 'webmcp_accelerator'
     6 -- collectgarbage("stop")
     8 -- open and set default database handle
     9 config.db = {
    10   engine='postgresql',
    11   dbname='webmcp_demo'
    12 }
    14 listen{
    15   { proto = "tcp4", port = 8080 },
    16   { proto = "tcp6", port = 8080 },
    17   { proto = "interval", delay = 60, handler = function() io.stderr:write("Background job executed here\n") end }
    18 }
    20 --[[
    21 -- enable output of SQL commands in trace system
    22 function db:sql_tracer(command)
    23   return function(error_info)
    24     local error_info = error_info or {}
    25     trace.sql{ command = command, error_position = error_info.position }
    26   end
    27 end
    28 --]]
    30 -- 'request.get_relative_baseurl()' should be replaced by the absolute
    31 -- base URL of the application, as otherwise HTTP redirects will not be
    32 -- standard compliant
    33 --request.set_absolute_baseurl(request.get_relative_baseurl())
    35 -- uncomment the following lines, if you want to use a database driven
    36 -- tempstore (for flash messages):
    37 --
    38 -- function tempstore.save(blob)
    39 --   return Tempstore:create(blob)
    40 -- end
    41 -- function tempstore.pop(key)
    42 --   return Tempstore:data_by_key(key)
    43 -- end
