webmcp

view demo-app/config/demo.lua @ 456:59a6f4851764

Added request.get_header{...} function
author jbe
date Mon Jul 25 22:27:17 2016 +0200 (2016-07-25)
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

Impressum / About Us