博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
发现一个nginx LUA开发Web App的框架
阅读量:4326 次
发布时间:2019-06-06

本文共 3211 字,大约阅读时间需要 10 分钟。

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-demorequest对象的属性和方法   --属性method          = ngx.var.request_method    -- http://wiki.nginx.org/HttpCoreModule#.24request_methodschema          = ngx.var.schema            -- http://wiki.nginx.org/HttpCoreModule#.24schemehost            = ngx.var.host              -- http://wiki.nginx.org/HttpCoreModule#.24hosthostname        = ngx.var.hostname          -- http://wiki.nginx.org/HttpCoreModule#.24hostnameuri             = ngx.var.request_uri       -- http://wiki.nginx.org/HttpCoreModule#.24request_uripath            = ngx.var.uri               -- http://wiki.nginx.org/HttpCoreModule#.24urifilename        = ngx.var.request_filename  -- http://wiki.nginx.org/HttpCoreModule#.24request_filenamequery_string    = ngx.var.query_string      -- http://wiki.nginx.org/HttpCoreModule#.24query_stringuser_agent      = ngx.var.http_user_agent   -- http://wiki.nginx.org/HttpCoreModule#.24http_HEADERremote_addr     = ngx.var.remote_addr       -- http://wiki.nginx.org/HttpCoreModule#.24remote_addrremote_port     = ngx.var.remote_port       -- http://wiki.nginx.org/HttpCoreModule#.24remote_portremote_user     = ngx.var.remote_user       -- http://wiki.nginx.org/HttpCoreModule#.24remote_userremote_passwd   = ngx.var.remote_passwd     -- http://wiki.nginx.org/HttpCoreModule#.24remote_passwdcontent_type    = ngx.var.content_type      -- http://wiki.nginx.org/HttpCoreModule#.24content_typecontent_length  = ngx.var.content_length    -- http://wiki.nginx.org/HttpCoreModule#.24content_lengthheaders         = ngx.req.get_headers()     -- http://wiki.nginx.org/HttpLuaModule#ngx.req.get_headersuri_args        = ngx.req.get_uri_args()    -- http://wiki.nginx.org/HttpLuaModule#ngx.req.get_uri_argspost_args       = ngx.req.get_post_args()   -- http://wiki.nginx.org/HttpLuaModule#ngx.req.get_post_argssocket          = ngx.req.socket            -- http://wiki.nginx.org/HttpLuaModule#ngx.req.socket--方法request:read_body()                         -- http://wiki.nginx.org/HttpLuaModule#ngx.req.read_bodyrequest: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_urirequest:set_uri_args(args)                  -- http://wiki.nginx.org/HttpLuaModule#ngx.req.set_uri_args  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.redirectresponse:finish()                           -- http://wiki.nginx.org/HttpLuaModule#ngx.eofresponse:is_finished()response:defer(func, ...)                   -- 在response返回后执行 支持 Multi-App 与 Sub-App

 

转载于:https://www.cnblogs.com/archoncap/p/5239692.html

你可能感兴趣的文章
Ruby数组的操作
查看>>
hdu1181暴搜
查看>>
解码字符串 Decode String
查看>>
json学习笔记
查看>>
工具:linux 性能监控工具-nmon
查看>>
fatal error C1853
查看>>
Ural 1001 - Reverse Root
查看>>
玩转webpack之webpack的entry output
查看>>
java 操作mongodb查询条件的常用设置
查看>>
黑马程序员_java基础笔记(02)...java语言基础组成
查看>>
对innodb 拷贝文件实现数据库的方式(转)
查看>>
python知识点 2014-07-09
查看>>
FloatingActionButton的一点学习感悟
查看>>
ABAP CDS ON HANA-(10)項目結合して一つ項目として表示
查看>>
网站地址信息
查看>>
产品经理 - 登录 注册
查看>>
阶段3 2.Spring_01.Spring框架简介_03.spring概述
查看>>
阶段3 2.Spring_02.程序间耦合_1 编写jdbc的工程代码用于分析程序的耦合
查看>>
阶段3 2.Spring_01.Spring框架简介_04.spring发展历程
查看>>
阶段3 2.Spring_02.程序间耦合_3 程序的耦合和解耦的思路分析1
查看>>