A HTTP Server to work with
web applications written in Lua
$ luarocks install pegasus
local pegasus = require 'pegasus'
local server = pegasus:new({
port='9090',
location='root/'
})
server:start(function (request, response)
print "It's running..."
end)
local pegasus = require 'pegasus'
local server = pegasus:new({ port='9090' })
server:start(function (req, rep)
rep:addHeader(Cache-Control, no-cache)
:write('hello pegasus world!')
end)