Lor是一个运行在OpenResty上的基于Lua编写的Web框架.

网友投稿 1063 2022-11-01

Lor是一个运行在OpenResty上的基于Lua编写的Web框架.

Lor是一个运行在OpenResty上的基于Lua编写的Web框架.

Lor

中文 English

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()

Examples

lor-exampleopenresty-china

Installation

shell

git clone https://github.com/sumory/lorcd lormake 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

opm install is supported from v0.2.2.

opm install sumory/lor

lord cli is not supported with this installation.

homebrew

you can use homebrew-lor on Mac OSX.

$ brew tap syhily/lor$ brew install lor

Features

Routing like Sinatra which is a famous Ruby frameworkSimilar API with Express, good experience for Node.js or Javascript developersMiddleware supportGroup router supportSession/Cookie/Views supported and could be redefined with MiddlewareEasy to build HTTP APIs, web site, or single page applications

Docs & Community

Website and Documentation.Github Organization for Official Middleware & Modules.

Quick Start

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 -hlor ${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.

Tests

Install busted, then run test

busted spec/*

Homebrew

https://github.com/syhily/homebrew-lor maintained by @syhily

Contributors

@ms2008@wanghaisheng@lihuibin@syhily@vinsonzou@lhmwzy@hanxi@诗兄@hetz@XadillaX

License

MIT

版权声明:本文内容由网络用户投稿,版权归原作者所有,本站不拥有其著作权,亦不承担相应法律责任。如果您发现本站中有涉嫌抄袭或描述失实的内容,请联系我们jiasou666@gmail.com 处理,核实后本网站将在24小时内删除侵权内容。

上一篇:simple-react一个极简的React框架,用于说明React实现原理
下一篇:mybatis的动态SQL以及连接池详解
相关文章

 发表评论

暂时没有评论,来抢沙发吧~