1
0
mirror of https://github.com/lxsang/antd-web-apps synced 2024-11-19 18:08:21 +01:00

add ci control

This commit is contained in:
lxsang 2020-06-25 21:55:55 +02:00
parent 0da98332c5
commit 41b25648ac
4 changed files with 53 additions and 2 deletions

View File

@ -1,5 +1,5 @@
BUILDDIR?=./build
PROJS?=grs info blog apps os doc
PROJS?=grs info blog apps os doc ci
copyfiles = index.ls mimes.json
main: copy
for f in $(PROJS); do BUILDDIR=$(BUILDDIR)/"$${f}" make -C "$${f}" ; done

5
ci/Makefile Normal file
View File

@ -0,0 +1,5 @@
copyfiles = router.lua
main:
- mkdir $(BUILDDIR)
cp -rvf $(copyfiles) $(BUILDDIR)

46
ci/router.lua Normal file
View File

@ -0,0 +1,46 @@
-- the rewrite rule for the framework
-- should be something like this
-- ^\/apps\/+(.*)$ = /apps/router.lua?r=<1>&<query>
-- some global variables
DIR_SEP = "/"
WWW_ROOT = __ROOT__.."/ci"
if HEADER.Host then
HTTP_ROOT= "https://"..HEADER.Host
else
HTTP_ROOT = "https://ci.iohub.dev"
end
-- class path: path.to.class
BASE_FRW = ""
-- class path: path.to.class
CONTROLLER_ROOT = BASE_FRW.."apps.controllers"
MODEL_ROOT = BASE_FRW.."apps.models"
-- file path: path/to/file
VIEW_ROOT = WWW_ROOT..DIR_SEP.."views"
LOG_ROOT = WWW_ROOT..DIR_SEP.."logs"
-- require needed library
require(BASE_FRW.."silk.api")
function NotfoundController:index(...)
local args = {...}
return false
end
-- registry object store global variables
local REGISTRY = {}
-- set logging level
REGISTRY.logger = Logger:new{ levels = {INFO = false, ERROR = false, DEBUG = false}}
REGISTRY.layout = 'default'
REGISTRY.fileaccess = false
local router = Router:new{registry = REGISTRY}
REGISTRY.router = router
router:setPath(CONTROLLER_ROOT)
--router:route('edit', 'post/edit', "ALL" )
router:route('default', default_routes_dependencies )
router:delegate()

View File

@ -8,7 +8,7 @@ WWW_ROOT = __ROOT__.."/get"
if HEADER.Host then
HTTP_ROOT= "https://"..HEADER.Host
else
HTTP_ROOT = "https://get.makeand.run"
HTTP_ROOT = "https://get.iohub.dev"
end
-- class path: path.to.class
BASE_FRW = ""