mirror of
https://github.com/lxsang/antd-web-apps
synced 2024-11-20 02:18:20 +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
|
-- some global variables
|
||||||
DIR_SEP = ""
|
DIR_SEP = ""
|
||||||
@ -11,6 +6,13 @@ HTTP_ROOT = ""
|
|||||||
MODEL_ROOT = ""
|
MODEL_ROOT = ""
|
||||||
CONTROLLER_ROOT = ""
|
CONTROLLER_ROOT = ""
|
||||||
VIEW_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
|
-- registry object store global variables
|
||||||
local REGISTRY = {}
|
local REGISTRY = {}
|
||||||
@ -23,4 +25,5 @@ local router = Router{registry = REGISTRY}
|
|||||||
REGISTRY.router = router
|
REGISTRY.router = router
|
||||||
router.setPath(CONTROLLER_ROOT)
|
router.setPath(CONTROLLER_ROOT)
|
||||||
router.delegate()
|
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()
|
function Logger:initialize()
|
||||||
end
|
end
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
require("OOP")
|
require("OOP")
|
||||||
require("sqlite")
|
require("sqlite")
|
||||||
require("silk.Router")
|
require(BASE_FRW.."silk.Router")
|
||||||
require("silk.BaseController")
|
require(BASE_FRW.."silk.BaseController")
|
||||||
require("silk.BaseModel")
|
require(BASE_FRW.."silk.BaseModel")
|
||||||
require("silk.Logger")
|
require(BASE_FRW.."silk.Logger")
|
||||||
require("silk.Template")
|
require(BASE_FRW.."silk.Template")
|
||||||
|
|
||||||
function Object:extends(o)
|
function Object:extends(o)
|
||||||
return self:inherit(o)
|
return self:inherit(o)
|
||||||
|
Loading…
Reference in New Issue
Block a user