mirror of
https://github.com/lxsang/antd-web-apps
synced 2024-12-26 17:38:21 +01:00
add silk framework
This commit is contained in:
parent
5bf7933c3a
commit
1f369c61ec
@ -1,8 +1,3 @@
|
||||
-- require needed library
|
||||
require("silk.api")
|
||||
-- need to define this
|
||||
-- basically it initialize an session object
|
||||
session_start()
|
||||
|
||||
-- some global variables
|
||||
DIR_SEP = ""
|
||||
@ -11,6 +6,13 @@ HTTP_ROOT = ""
|
||||
MODEL_ROOT = ""
|
||||
CONTROLLER_ROOT = ""
|
||||
VIEW_ROOT = ""
|
||||
BASE_FRW = "apps."
|
||||
|
||||
-- require needed library
|
||||
require("silk.api")
|
||||
-- need to define this
|
||||
-- basically it initialize an session object
|
||||
session_start()
|
||||
|
||||
-- registry object store global variables
|
||||
local REGISTRY = {}
|
||||
@ -23,4 +25,5 @@ local router = Router{registry = REGISTRY}
|
||||
REGISTRY.router = router
|
||||
router.setPath(CONTROLLER_ROOT)
|
||||
router.delegate()
|
||||
if REGISTRY.db then REGISTRY.db:close() end
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
Logger = Object:extends{registry = {}, levels = {}}
|
||||
Logger = Object:extends{levels = {}}
|
||||
|
||||
function Logger:initialize()
|
||||
end
|
||||
|
@ -1,10 +1,10 @@
|
||||
require("OOP")
|
||||
require("sqlite")
|
||||
require("silk.Router")
|
||||
require("silk.BaseController")
|
||||
require("silk.BaseModel")
|
||||
require("silk.Logger")
|
||||
require("silk.Template")
|
||||
require(BASE_FRW.."silk.Router")
|
||||
require(BASE_FRW.."silk.BaseController")
|
||||
require(BASE_FRW.."silk.BaseModel")
|
||||
require(BASE_FRW.."silk.Logger")
|
||||
require(BASE_FRW.."silk.Template")
|
||||
|
||||
function Object:extends(o)
|
||||
return self:inherit(o)
|
||||
|
Loading…
Reference in New Issue
Block a user