• Stars
    star
    1,014
  • Rank 44,934 (Top 0.9 %)
  • Language
    Lua
  • License
    MIT License
  • Created over 8 years ago
  • Updated 8 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

a fast, minimalist web framework for lua based on OpenResty

Lor

https://travis-ci.org/sumory/lor.svg?branch=master GitHub release license

中文 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

Installation

  1. shell
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
  1. opm

opm install is supported from v0.2.2.

opm install sumory/lor

lord cli is not supported with this installation.

  1. 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 framework
  • Similar API with Express, good experience for Node.js or Javascript developers
  • Middleware support
  • Group router support
  • Session/Cookie/Views supported and could be redefined with Middleware
  • Easy to build HTTP APIs, web site, or single page applications

Docs & Community

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 -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.

Tests

Install busted, then run test

busted spec/*

Homebrew

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

Contributors

License

MIT

More Repositories

1

openresty-china

OpenResty China Community
JavaScript
283
star
2

gru

即时通讯服务集群,可用于构建聊天等实时交互系统
CSS
281
star
3

sumorio

a sns system for developers based on nodejs
JavaScript
133
star
4

moklr

another "postman", status server, http request mock.
JavaScript
87
star
5

uc

UC是一个用于处理分布式系统中ID生成,唯一性字段值管理的通用模块.
Java
69
star
6

gru-example

Gru使用示例 - Web Chat
JavaScript
61
star
7

BTC

all about to build a bitcoin mining pool, auto-pay system, scanning blocks etc.
Python
58
star
8

confd

configuration management
Go
44
star
9

lincell

lincell是用Node.js开发的轻型文件编辑器,只需一条命令即可将文件夹变成一个工作空间供远程访问
JavaScript
33
star
10

sumory-note

all about to build a bitcoin mining pool, auto-pay system, scanning blocks etc.
Python
31
star
11

idgen

id generator based on 'snowflake'
Go
29
star
12

nodis

Prefix match search and Segment words search built on Node.js and Redis
JavaScript
16
star
13

ciao

a minimal C++ web framework (beta)
C++
13
star
14

beauty

Beautiful console: colorful && stylized. Use it without doing anything to `console`.
JavaScript
7
star
15

baseN

Encode number to base(2~62) hash string and decode it back.
JavaScript
7
star
16

gotty

A tcp server framework for Golang.
Go
5
star
17

ltcblockchain

a Litecoin data explorer, just like blockchain.com or ltc.block-explorer.com
JavaScript
4
star
18

runbot

与`moklr`搭配的status api请求检查服务
Go
3
star
19

litchi

websocket server experiment just for fun.
Lua
3
star
20

social_oauth

3
star
21

milor

a minimal lib for http utility.
2
star
22

scripts

dotfiles/useful scripts etc.
Shell
2
star
23

orange.sumory.com

website for `orange`
CSS
2
star
24

sumory.github.io

my personal site.
HTML
2
star
25

hexo-theme-fatty

just a theme for hexo
CSS
1
star
26

log4go

Go
1
star
27

mas

a state management library.
C++
1
star
28

jwt

a java web project template - based on Spring MVC and Spring JDBC
Java
1
star
29

baseN4go

baseN for go
Go
1
star
30

orange-peel

Orange Dashboard
JavaScript
1
star
31

lor_site

documents for `lor` framework
HTML
1
star
32

mkd

cli to view and edit markdown files.
JavaScript
1
star