在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称(OpenSource Name):EvandroLG/pegasus.lua开源软件地址(OpenSource Url):https://github.com/EvandroLG/pegasus.lua开源编程语言(OpenSource Language):Lua 97.6%开源软件介绍(OpenSource Introduction):An http server to work with web applications written in Lua language check the site. InstallationTo install Pegasus.lua, run: $ luarocks install pegasus How does it work?Follow an example: local pegasus = require 'pegasus'
local server = pegasus:new({
port='9090',
location='example/root'
})
server:start(function (request, response)
print "It's running..."
end) Features
APIParameters
RequestProperties
ResponseMethods
local pegasus = require 'pegasus'
local server = pegasus:new({ port='9090' })
server:start(function (req, rep)
rep:addHeader('Date', 'Mon, 15 Jun 2015 14:24:53 GMT'):write('hello pegasus world!')
end) Native Plugin
local Pegasus = require 'pegasus'
local Compress = require 'pegasus.compress'
local server = Pegasus:new({
plugins = { Compress:new() }
})
server:start() ContributingInstall Dependencies$ make install_dependencies Running tests$ make unit_test |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论