Skip to content

zhangjinde/lua-mongoose

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

#lua-mongoose 一个lua的http server库,基于mongoose

用起来是这样的:

local mongoose = require("mongoose")

local function http_handle(ctx)
	for k,v in pairs(ctx) do
		print(k,v)
	end
	print()
	return "hello mongoose"
end


local server1 = mongoose.create(8080, http_handle)
local server2 = mongoose.create(9090, http_handle)
while true do
	server1:poll()
	server2:poll()
end

看起来是这样的: image

About

a lua http server library binding with mongoose

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published