代码拉取完成,页面将自动刷新
A fast and minimalist web framework based on OpenResty.
local lor = require("lor.index")
local app = lor()
app:get("/", function(req, res, next)
res:send("hello world!")
end)
app:run()
git clone https://github.com/sumory/lor
cd lor
make install
LOR_HOME
and LORD_BIN
are supported by Makefile
, so the following command could be used to customize installation:
make install LOR_HOME=/path/to/lor LORD_BIN=/path/to/lord
opm install
is supported from v0.2.2.
opm install sumory/lor
lord
cli is not supported with this installation.
you can use homebrew-lor on Mac OSX.
$ brew tap syhily/lor
$ brew install lor
Middleware
A quick way to get started with lor is to utilize the executable cli tool lord
to generate an scaffold application.
lord
is installed with lor
framework. it looks like:
$ lord -h
lor ${version}, a Lua web framework based on OpenResty.
Usage: lord COMMAND [OPTIONS]
Commands:
new [name] Create a new application
start Starts the server
stop Stops the server
restart Restart the server
version Show version of lor
help Show help tips
Create app:
$ lord new lor_demo
Start server:
$ cd lor_demo && lord start
Visit http://localhost:8888.
Install busted, then run test
busted spec/*
https://github.com/syhily/homebrew-lor maintained by @syhily
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。