中文 Englisch
Ein schnelles und minimalistisches Web -Framework, das auf OpenResty basiert.
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 und LORD_BIN werden von Makefile unterstützt, sodass der folgende Befehl verwendet werden kann, um die Installation anzupassen:
make install LOR_HOME=/path/to/lor LORD_BIN=/path/to/lord
opm install wird von V0.2.2 unterstützt.
opm install sumory/lor
lord Cli wird von dieser Installation nicht unterstützt.
Sie können Homebrew-Lor unter Mac OSX verwenden.
$ brew tap syhily/lor
$ brew install lor
Middleware neu definiert werden Ein schneller Weg, um mit LOR zu beginnen, besteht darin, den ausführbaren CLI -Tool lord zu nutzen, um eine Gerüstanwendung zu generieren.
lord ist mit lor -Framework installiert. Es sieht aus wie:
$ 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 tipsApp erstellen:
$ lord new lor_demo
Server starten:
$ cd lor_demo && lord start
Besuchen Sie http: // localhost: 8888.
Busted installieren und dann Test ausführen
busted spec/*
https://github.com/syhily/homebrew-lor beibehalten von @Syhily
MIT