GithubHelp home page GithubHelp logo

linecode / lor Goto Github PK

View Code? Open in Web Editor NEW

This project forked from sumory/lor

0.0 2.0 0.0 334 KB

a fast, minimalist web framework for lua based on OpenResty

Home Page: http://lor.sumory.com

License: MIT License

Shell 2.06% Makefile 0.53% Lua 97.42%

lor's Introduction

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

lor's People

Contributors

hanxi avatar lhmwzy avatar lihuibin avatar ms2008 avatar sumory avatar syhily avatar vinsonzou avatar wanghaisheng avatar wtkb avatar xadillax avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.