aLiLua:一个lua web 框架

By youbbs at 2015-07-21 16:47 • 1570次点击
youbbs

aLiLua 是一套基于 epoll/kqueue/Lua 构建的网络服务开发框架
aLiLua 使用 epoll 进行网络/文件IO事件读写,对Lua协程进行调度,其性能高效并且简单

http://alilua.com/ 13
https://github.com/oneoo/alilua 7

example


local db = mysql:new()
local db_ok, err, errno, sqlstate = db:connect({
					host = "localhost",
					port = 3306,
					pool_size = 256,
					database = "db",
					user = "user",
					password = "***"})
if not db_ok then
	header('HTTP/1.1 503 ServerError')
	die('MySQL Connection Error.')
end
 
local res, err, errno, sqlstate = db:query("SELECT * FROM t1 LIMIT 1")
if not res then
	echo("bad result: ", err, ": ", errno, ": ", sqlstate, ".")
else
	echo("result: ", json_encode(res)..'\n')
end

alilua, lua, web, 框架


luvit 被忽视的lua 高性能框架 https://github.com/luvit/lit 11

ego008 at 2018-03-08 22:58
1

@ego008

嗯嗯

放牛哥 at 2018-03-13 14:13
2
登录 后发表评论