require "http/server"
server = HTTP::Server.new(8080) do |context|
context.response.content_type = "text/plain"
context.response.print "Hello world!"
end
puts "Listening on http://127.0.0.1:8080"
server.listen
It should be Int32, I’m thinking this has to be a bug since the overload in the docs there isn’t displayed in the error message’s list. It’s like the self.new constructors aren’t being seen.