Lua实现的Node.js Luvit

码农软件 · 软件分类 · 服务框架/平台 · 2019-09-26 14:29:14

软件介绍

Luvit - Lua + UV + Jit = NodeJS re-implemented in Lua

如上面标题所描述的,Luvit 相当于 luajit2 + libuv,编译成单个可执行文件,类似 Node.js ,可运行 .lua 文件。

示例代码(创建一个HTTP服务器)

-- Load the http library
local HTTP = require("lib/http")

-- Create a simple nodeJS style hello-world server
HTTP.create_server(function (req, res)
  res:write_head(200, {
    ["Content-Type"] = "text/plain",
    ["Content-Length"] = "11"
  })
  res:write("Hello World")
  res:finish()
end):listen(8080)

-- Give a friendly message
print("Server listening at http://localhost:8080/")


本文地址:https://codercto.com/soft/d/15446.html

Algorithms in C, Parts 1-4

Algorithms in C, Parts 1-4

Robert Sedgewick / Addison-Wesley Professional / 1997-9-27 / USD 89.99

"This is an eminently readable book which an ordinary programmer, unskilled in mathematical analysis and wary of theoretical algorithms, ought to be able to pick up and get a lot out of.." - Steve Sum......一起来看看 《Algorithms in C, Parts 1-4》 这本书的介绍吧!

CSS 压缩/解压工具
CSS 压缩/解压工具

在线压缩/解压 CSS 代码

图片转BASE64编码
图片转BASE64编码

在线图片转Base64编码工具

XML、JSON 在线转换
XML、JSON 在线转换

在线XML、JSON转换工具