使用openresty-lua-types+TypeScriptToLua+test-nginx 开发强类型的nginx lua 模块

参考玩法

参考图

 

 

原理简单说明

基于TypeScriptToLua ts 到lua 的能力,结合openresty-lua-types提供的openresty 类型能力可以开发强类型的代码处理
本地可以基于test-nginx 进行测试,之后提交到git ,利用ci/cd 实现模块到npm 私服,部署openresty 的reload 可以在cd 阶段利用
npm 的能力统一管理开发的lua 模块

说明

以上目前只是一个简单的集成思路,后边会做一些实践,可以供大家参考

参考资料

https://github.com/openresty/test-nginx
https://github.com/TypeScriptToLua/TypeScriptToLua
https://github.com/andrei-markeev/openresty-lua-types
https://github.com/openresty/lua-nginx-module

posted on 2022-04-17 23:29  荣锋亮  阅读(41)  评论(0编辑  收藏  举报

导航