代码拉取完成,页面将自动刷新
--web 入口
--version:1.0.0
--Copyright (C) Yuanlun He.
local require = require
local package = package
local pack_path = package.path
local find = string.find
local sub = string.sub
local ngx = ngx
local ngx_var = ngx.var
local ngx_header = ngx.header
--设置默认输出类型
ngx_header["Content-Type"] = "text/html; charset=utf-8"
--根目录
local root = ngx_var.document_root:sub(1,-4)
--添加类加载路劲
local p = root.."?.lua;"..root.."views/?.lua.html;"
if pack_path:sub(1,#p)~=p then package.path = p..pack_path end
--初始化请求生命周期内的全局变量
ngx.ctx = require("vendor.Application"):new()
--设置根目录
ngx.ctx.web.root = root
--执行请求
ngx.ctx:out(ngx.ctx:run())
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。