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对象的属性和方法

--属性
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 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

最新文章

  1. 生成短链(网址) ShortUrlLink
  2. D3.js 更自由的条形图
  3. android menu 开发
  4. iOS开发——开发必备OC篇&UITableView设置界面完整封装(四)
  5. C#的显式接口和隐式接口(转载)
  6. 对比字节流和字符流,回答为什么FileReader不能用来拷贝图片
  7. java 线程 理解 解析
  8. Kendo UI ASP.Net MVC 实现多图片及时显示加上传(其中有借鉴别人的代码,自己又精简了一下,如有冒犯,请多原谅!)
  9. 生信基础知识【04】GO和pathway分析
  10. iOS:如何实现在文字上添加拼音
  11. C语言复制图片文件
  12. JavaScript学习(二)
  13. CentOS 系列安装 Docker
  14. js判断是否IE浏览器
  15. Android——FilenameFilter总结(转)
  16. 【cs229-Lecture5】生成学习算法:1)高斯判别分析(GDA);2)朴素贝叶斯(NB)
  17. Lua中Table的学习
  18. 第三个spirit(第十四天)
  19. mysql 加入远程用户
  20. CAD增强属性块的还原(转)

热门文章

  1. BOOST 实用手册(摘录自校友博客)
  2. ylbtech-LanguageSamples-Nullable(可以为 null 的类型)
  3. WAF实现扫描器识别
  4. 在Windows Server 2008 R2上安装Exchange 2013过程中遇到的一些问题
  5. scrapy-splash抓取动态数据例子三
  6. 记一次vue2项目部署nginx静态文件404解决过程
  7. 将QQl里面的休息都迁移过来了
  8. Android传感器的介绍
  9. C++11 可变参数模板构造string列表
  10. pip运行报错Fatal error in launcher: Unable to create process using pip.exe