安裝 lua web framework lapis

装了lua 的 web framework lapis, 发现完成编译需要 luaossl , 给了所需的 lib 就行了

⋊> ~  luarocks install luaossl CRYPTO_DIR=/usr/local/opt/openssl OPENSSL_DIR=/usr/local/opt/openssl

然后装起来

⋊> ~  luarocks install lapis 
pgmoon 1.10.0-1 is now installed in /Users/z/.asdf/installs/lua/5.1/luarocks (license: MIT)

lapis 1.7.0-1 is now installed in /Users/z/.asdf/installs/lua/5.1/luarocks (license: MIT)

我这里用 asdf 管理, 所以要弄个 symbolic link.

ln -s ~/.asdf/installs/lua/5.1/luarocks/bin/lapis  ~/.asdf/shims

试用下

⋊> ~/test lapis new                                                                                        21:05:47
wrote   nginx.conf
wrote   mime.types
wrote   app.moon
wrote   models.moon

这个 .moon file 需要 moonscript 编译

⋊> ~/test luarockt install moonscript
ln -s ~/.asdf/installs/lua/5.1/luarocks/bin/moonc ~/.asdf/shims
⋊> ~/test lapis server                                                                                     21:25:37
nginx: [alert] lua_code_cache is off; this will hurt performance in /Users/z/test/nginx.conf.compiled:16
2019/08/28 21:25:43 [notice] 34366#0: using the "kqueue" event method
2019/08/28 21:25:43 [warn] 34366#0: 1024 worker_connections exceed open file resource limit: 256
2019/08/28 21:25:43 [notice] 34366#0: openresty/1.15.8.1
2019/08/28 21:25:43 [notice] 34366#0: built by clang 10.0.0 (clang-1000.10.44.4)
2019/08/28 21:25:43 [notice] 34366#0: OS: Darwin 17.7.0
2019/08/28 21:25:43 [notice] 34366#0: hw.ncpu: 4
2019/08/28 21:25:43 [notice] 34366#0: net.inet.tcp.sendspace: 131072
2019/08/28 21:25:43 [notice] 34366#0: kern.ipc.somaxconn: 128
2019/08/28 21:25:43 [notice] 34366#0: getrlimit(RLIMIT_NOFILE): 256:9223372036854775807
2019/08/28 21:25:43 [notice] 34366#0: start worker processes
2019/08/28 21:25:43 [notice] 34366#0: start worker process 34518
最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

相关阅读更多精彩内容

友情链接更多精彩内容