Skip to content

Commit

Permalink
Handle address parameter in listen method
Browse files Browse the repository at this point in the history
  • Loading branch information
radare committed Dec 9, 2011
1 parent d96c1e6 commit 137b1d0
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions modules/connect/server.lua
Expand Up @@ -59,9 +59,10 @@ function server.use(s, h)
return s
end

function server.listen(s, port)
function server.listen(s, port, host)
if not host then host = "0.0.0.0" end
print ("luvit-Connect listening on port "..port)
HTTP.create_server ("0.0.0.0", port, function (req, res)
HTTP.create_server (host, port, function (req, res)
local app = s.app
app.server = s
app.req = req
Expand Down

0 comments on commit 137b1d0

Please sign in to comment.