jbe/bsw@0: jbe/bsw@0: -- open and set default database handle jbe@254: config.db = { jbe/bsw@0: engine='postgresql', jbe/bsw@0: dbname='webmcp_demo' jbe@254: } jbe/bsw@0: jbe@254: listen{ jbe@512: { proto = "tcp", host = "::1", port = 8080 }, jbe@512: { proto = "tcp", host = "127.0.0.1", port = 8080 }, jbe@316: { proto = "interval", delay = 60, handler = function() io.stderr:write("Background job executed here\n") end } jbe@254: } jbe@254: jbe/bsw@0: -- 'request.get_relative_baseurl()' should be replaced by the absolute jbe/bsw@0: -- base URL of the application, as otherwise HTTP redirects will not be jbe/bsw@0: -- standard compliant jbe@254: --request.set_absolute_baseurl(request.get_relative_baseurl()) jbe/bsw@0: jbe/bsw@0: -- uncomment the following lines, if you want to use a database driven jbe@508: -- tempstore instead of a file-based tempstore (for flash messages): jbe/bsw@0: -- jbe/bsw@0: -- function tempstore.save(blob) jbe/bsw@0: -- return Tempstore:create(blob) jbe/bsw@0: -- end jbe/bsw@0: -- function tempstore.pop(key) jbe/bsw@0: -- return Tempstore:data_by_key(key) jbe/bsw@0: -- end jbe/bsw@0: