1.预先准备2个文件file1.txt和file2.txt.文件内容为网页上摘下,不具有代表性,只为举例. file1.txt内容为: With this setup, whenever you change the content of ambari-web files on the host machine, brunch will pick up changes in the background and update. Because of the symbolic link, the…
openresty 前端开发入门五之Mysql篇 这章主要演示怎么通过lua连接mysql,并根据用户输入的name从mysql获取数据,并返回给用户 操作mysql主要用到了lua-resty-mysql库,代码可以在github上找得到 而且上面也有实例代码 由于官网给出的例子比较基本,代码也比较多,所以我这里主要介绍一些怎么封装一下,简化我们调用的代码 lua/mysql.lua local mysql = require "resty.mysql" local config =…