官术网_书友最值得收藏!

1.10 參考手冊(cè)

OpenResty附帶了非常完善的用戶參考手冊(cè)restydoc,提供與UNIX手冊(cè)man相同的功能,可以檢索OpenResty里所有組件的幫助文檔,包括但不限于:

    ■  OpenResty各個(gè)組件的介紹和用法;
    ■  OpenResty指令和功能接口的用法;
    ■  Nginx介紹、用法、基本工作原理;
    ■  Lua/LuaJIT語法要素。

下面示范了一些restydoc的用法,其中的“-s”參數(shù)用來指定搜索手冊(cè)里的小節(jié)名:

restydoc nginx                                #Nginx的說明
restydoc luajit                               #LuaJIT的說明
restydoc opm                                  #包管理工具opm的說明
restydoc resty-cli                            #命令行工具resty的說明
restydoc ngx_echo                             #ngx_echo組件的說明
restydoc ngx_lua                              #ngx_lua的說明
restydoc stream_lua                           #stream_lua的說明
restydoc lua-cjson                            #lua-cjson的說明
restydoc -s proxy_pass                        #反向代理指令proxy_pass的說明
restydoc -s content_by_lua_block              #content_by_lua_block指令的說明
restydoc -s ngx.say                           #功能接口ngx.say的說明
restydoc -s concat                            #Lua函數(shù)concat的說明

對(duì)于使用opm安裝的組件,需要使用“-r”參數(shù)指定安裝目錄,例如:

restydoc -r /usr/local/openresty/site -s lua-resty-http

多使用restydoc可以幫助我們盡快熟悉OpenResty開發(fā)。

主站蜘蛛池模板: 南漳县| 旌德县| 邮箱| 高雄县| 彭州市| 广丰县| 镇巴县| 龙岩市| 宁南县| 巴彦淖尔市| 霍州市| 万源市| 翼城县| 武乡县| 克东县| 镇远县| 陇南市| 马公市| 玛沁县| 德令哈市| 巴里| 泽州县| 托克逊县| 镇安县| 元朗区| 宽甸| 阿合奇县| 江永县| 保康县| 五常市| 措勤县| 武穴市| 临夏市| 大庆市| 云龙县| 余干县| 绥阳县| 穆棱市| 南郑县| 浙江省| 深泽县|