Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: d75fa19e3a
Fetching contributors…

Cannot retrieve contributors at this time

35 lines (25 sloc) 0.657 kb
local p = require('utils').prettyPrint
local runOnce = require('luv').runOnce
local socketHandler = require('web').socketHandler
local createServer = require('continuable').createServer
local app = function (req, res)
-- p{req=req,res=res}
res(200, {
["Content-Type"] = "text/plain"
}, "Hello World\n")
end
app = require('autoheaders')(app)
app = require('log')(app)
p{app=app}
app({
method = "GET",
url = { path = "/" },
headers = {}
}, p)
createServer("0.0.0.0", 8080, socketHandler(app))
print("http server listening at http://localhost:8080/")
require('luv').run()
--repeat
-- print(".\n")
--until runOnce() == 0
print("done.")
Jump to Line
Something went wrong with that request. Please try again.