页面静态化(openresty,lua)

打开openresty,启动nginx.exe
页面静态化(openresty,lua)
页面静态化(openresty,lua)
页面静态化(openresty,lua)
启动成功!
打开openresty==>conf==>nginx.conf
页面静态化(openresty,lua)
读取lua.conf
看看lua.conf 里面的配置
页面静态化(openresty,lua)
第一个是设置缓存大小
第二个端口号
第三个
#first match ngx location(首先匹配位置)
#then match root read file(其次匹配位置)
第四个路径,去读取绝对路径的lua 文件

页面静态化(openresty,lua)
页面静态化(openresty,lua)
里面大体的内容就是获取,获取路径,
从缓存换取数据,如果没有就从其他路径中获取数据(这个路径是有数据的)。在把这些数据存放在缓存中。把这些数据转换json数据。
再把json数据转换成每个对象。创建模块对象,把这些数据发送到item.html页面上去,跳转到item.html页面。
页面静态化(openresty,lua)

第一个循环遍历json数据
第二展示数据
第三个遍历集合