Permalink
Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
17 lines (15 sloc) 436 Bytes
-- luvit-connect example --
local connect = require ("connect")
local server = connect.createServer ()
:use (connect.logger ())
:use (connect.router (function (app)
app:get ("/", app.req.query, function (req, res)
local body = "<html><h1>Hello Luvit Connect World!</h1></html>"
res:write_head (200, {
["Content-Type"] = "text/html",
["Content-Length"] = #body
})
res:finish (body)
end)
end))
:listen (3333)