安裝 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

你可能感兴趣的:(安裝 lua web framework lapis)