Luvit's neglected Lua High performance framework (imitation Nodejs)

Source: Internet
Author: User
Tags lua

Luvit's neglected Lua High performance framework (imitation Nodejs)

SOURCE https://www.cnblogs.com/rongfengliang/p/7856329.html

Luvit open mode and Nodejs, but because of the ecological and minority language problems, the use of less people, but from the current update speed is relatively fast, but from the existing LUA development framework is generally inclined to use the Nginx+lua model, although it is said that Luvit performance than Nodejs is still high, there is no more widespread popularity of 1. Installation
curl -L https://github.com/luvit/lit/raw/master/get-lit.sh | sh
2. Simple code
local http = require(‘http‘)http.createServer(function (req, res)  local body = ‘Hello world\n‘  res:setHeader(‘Content-Type‘, ‘text/plain‘)  res:setHeader("Content-Length", #body)  res:finish(body)end):listen(1337, ‘0.0.0.0‘)print(‘Server running at http://127.0.0.1:1337/‘)
3. Description
尽管没有普及,但是模式以及贡献的一些lua 类库对于我们还是比较有帮助的比如: luv 类库一个异步,多线程模型类库,可以通过luarocks 安装
Reference documents
https://luvit.io/docs.htmlhttps://github.com/luvit/luvithttp://docs.libuv.org/en/v1.x/

Luvit's neglected Lua High performance framework (imitation Nodejs)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.