OpenResty 我的项目模板,新我的项目能够 clone 下来批改
我的项目地址:https://github.com/fengjx/ope...
相干浏览
- OpenResty 从入门到开发一个网关服务
- OpenResty 最佳实际
- 跟我学OpenResty(Nginx+Lua)开发
环境依赖
- openresty
- luarocks
make cmd
$ make helpMakefile cmd: deps: 装置依赖 start: 启动服务(前台过程) start: 启动服务(后盾过程) start: 进行服务 start: 进行服务 help: Makefile帮忙
疾速开始
# 下载我的项目模板$ git clone https://github.com/fengjx/openresty-quick-start.git# 删除 git 文件$ rm -rf .git# 批改我的项目名$ mv openresty-quick-start my-project$ cd my-project# 装置依赖$ make deps# 启动服务$ make start-backgroundserver start for background# 拜访测试$ curl -i http://localhost:1024HTTP/1.1 200 OKDate: Wed, 14 Oct 2020 13:14:59 GMTContent-Type: application/jsonTransfer-Encoding: chunkedConnection: keep-aliveServer: OpenRestyok# 进行服务$ make quitserver quit
目录构造
├── Makefile - makefile 脚本├── README.md - 阐明文档├── conf - nginx 配置│ ├── common - 公共配置│ └── servers - server 配置├── logs - 日志目录├── rockspec - 依赖治理└── src - lua 源码目录 ├── app.lua └── core