lor
v0.3.4
中文 Anglais
Un cadre Web rapide et minimaliste basé sur 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 et LORD_BIN sont pris en charge par Makefile , de sorte que la commande suivante pourrait être utilisée pour personnaliser l'installation:
make install LOR_HOME=/path/to/lor LORD_BIN=/path/to/lord
opm install est prise en charge à partir de V0.2.2.
opm install sumory/lor
lord CLI n'est pas soutenu par cette installation.
Vous pouvez utiliser Homebrew-Lor sur Mac OSX.
$ brew tap syhily/lor
$ brew install lor
Middleware Un moyen rapide de commencer avec LOR est d'utiliser le Lord Executable CLI Tool lord pour générer une application d'échafaudage.
lord est installé avec lor Framework. Il ressemble:
$ 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 tipsCréer l'application:
$ lord new lor_demo
SERVICE DE START:
$ cd lor_demo && lord start
Visitez http: // localhost: 8888.
Installez brisé, puis exécutez le test
busted spec/*
https://github.com/syhily/homebrew-lor entretenu par @Syhily
Mit