发现一个nginx LUA开发Web App的框架
2013-08-13 00:10
316 查看
nginx是个好东西, nginx的openrtsy发行版本更是个好东西。
今天又发现个好东西 :Moochine
MOOCHINE - 一个简单的轻量级的web framework, 基于ngx_OpenResty(ngx_lua,ttp://openresty.org) 做的框架,
使用例子 https://github.com/appwilldev/moochine-demo
项目地址:https://github.com/appwilldev/moochine
可以让我们构建WebApp 更加的简单,具体使用方法请看具体的 moochine-demo
request对象的属性和方法
今天又发现个好东西 :Moochine
MOOCHINE - 一个简单的轻量级的web framework, 基于ngx_OpenResty(ngx_lua,ttp://openresty.org) 做的框架,
使用例子 https://github.com/appwilldev/moochine-demo
项目地址:https://github.com/appwilldev/moochine
可以让我们构建WebApp 更加的简单,具体使用方法请看具体的 moochine-demo
request对象的属性和方法
--属性 method = ngx.var.request_method -- http://wiki.nginx.org/HttpCoreModule#.24request_method schema = ngx.var.schema -- http://wiki.nginx.org/HttpCoreModule#.24scheme host = ngx.var.host -- http://wiki.nginx.org/HttpCoreModule#.24host hostname = ngx.var.hostname -- http://wiki.nginx.org/HttpCoreModule#.24hostname uri = ngx.var.request_uri -- http://wiki.nginx.org/HttpCoreModule#.24request_uri path = ngx.var.uri -- http://wiki.nginx.org/HttpCoreModule#.24uri filename = ngx.var.request_filename -- http://wiki.nginx.org/HttpCoreModule#.24request_filename query_string = ngx.var.query_string -- http://wiki.nginx.org/HttpCoreModule#.24query_string user_agent = ngx.var.http_user_agent -- http://wiki.nginx.org/HttpCoreModule#.24http_HEADER remote_addr = ngx.var.remote_addr -- http://wiki.nginx.org/HttpCoreModule#.24remote_addr remote_port = ngx.var.remote_port -- http://wiki.nginx.org/HttpCoreModule#.24remote_port remote_user = ngx.var.remote_user -- http://wiki.nginx.org/HttpCoreModule#.24remote_user remote_passwd = ngx.var.remote_passwd -- http://wiki.nginx.org/HttpCoreModule#.24remote_passwd content_type = ngx.var.content_type -- http://wiki.nginx.org/HttpCoreModule#.24content_type content_length = ngx.var.content_length -- http://wiki.nginx.org/HttpCoreModule#.24content_length headers = ngx.req.get_headers() -- http://wiki.nginx.org/HttpLuaModule#ngx.req.get_headers uri_args = ngx.req.get_uri_args() -- http://wiki.nginx.org/HttpLuaModule#ngx.req.get_uri_args post_args = ngx.req.get_post_args() -- http://wiki.nginx.org/HttpLuaModule#ngx.req.get_post_args socket = ngx.req.socket -- http://wiki.nginx.org/HttpLuaModule#ngx.req.socket --方法 request:read_body() -- http://wiki.nginx.org/HttpLuaModule#ngx.req.read_body request:get_uri_arg(name, default) request:get_post_arg(name, default) request:get_arg(name, default) request:get_cookie(key, decrypt) request:rewrite(uri, jump) -- http://wiki.nginx.org/HttpLuaModule#ngx.req.set_uri request:set_uri_args(args) -- http://wiki.nginx.org/HttpLuaModule#ngx.req.set_uri_args[/code]response对象的属性和方法
--属性 headers = ngx.header -- http://wiki.nginx.org/HttpLuaModule#ngx.header.HEADER --方法 response:set_cookie(key, value, encrypt, duration, path) response:write(content) response:writeln(content) response:ltp(template,data) response:redirect(url, status) -- http://wiki.nginx.org/HttpLuaModule#ngx.redirect response:finish() -- http://wiki.nginx.org/HttpLuaModule#ngx.eof response:is_finished() response:defer(func, ...) -- 在response返回后执行
支持 Multi-App 与 Sub-App
相关文章推荐
- 发现一个nginx LUA开发Web App的框架
- 发现一个nginx LUA开发Web App的框架
- JFinal极速开发框架使用笔记(二) 两个问题,一个发现
- 一个简单的Unity游戏开发框架(lua自更新)
- 利用Visual Studio 2005 Extensions for Windows SharePoint Services 3.0开发,部署时发现的一个怪现象
- 框架使用的一个控件样式库,使用附加属性实现了很多效果,开发非常易复用
- 发现一个总结的非常全面的android开源框架
- 发现了一个开发RSS的好东:Argotic Syndication Framework
- 一个开发框架(手机网络)
- 发现一个不错的web桌面应用框架Echo
- 【Android游戏开发之四】基础的Android 游戏框架(一个游戏角色在屏幕行走的demo)
- 搭建一个C#开源快速开发框架(fastCSharp)
- 如何开发一个java开源框架-----Jvn框架之实现自定义Annotation以及拦截器(第五讲)
- 发现一个不错的网址,ios大牛级开发学习路线
- 发现一个很好的关于iphone开发的博…
- NimBus一个好的开发框架
- nginx和lua开发二
- ios开发愤怒的小鸟的Lua语言:Wax框架详解(一)
- 选择一个JavaScript框架进行WEB开发[转]
- (1)一步一步开发一个简单二维CAD之基本框架