Skip to content

Instantly share code, notes, and snippets.

@cablehead
Last active August 26, 2015 07:03
Show Gist options
  • Save cablehead/b223a7c76b8cdfe5fc4f to your computer and use it in GitHub Desktop.
Save cablehead/b223a7c76b8cdfe5fc4f to your computer and use it in GitHub Desktop.
$ levee run -e '
local levee = require("levee")
local h = levee.Hub()
local serve = h.http:listen(8000)
for conn in serve do
h:spawn(function()
local req = conn:recv()
req.response:send({levee.http.Status(200), {}, "Hello world\n"})
conn:close()
end)
end'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment