1
0
mirror of https://github.com/lxsang/antd-web-apps synced 2024-11-20 02:18:20 +01:00
antd-web-apps/apps/index.lua
2018-08-21 15:16:36 +02:00

27 lines
578 B
Lua

-- require needed library
require("silk.api")
-- need to define this
-- basically it initialize an session object
session_start()
-- some global variables
DIR_SEP = ""
WWW_ROOT = ""
HTTP_ROOT = ""
MODEL_ROOT = ""
CONTROLLER_ROOT = ""
VIEW_ROOT = ""
-- registry object store global variables
local REGISTRY = {}
-- set logging level
REGISTRY.logger = Logger{ levels = {INFO = true, ERROR = true, DEBUG = true}}
REGISTRY.db = nil
REGISTRY.layout = 'default'
local router = Router{registry = REGISTRY}
REGISTRY.router = router
router.setPath(CONTROLLER_ROOT)
router.delegate()