Last active
October 20, 2016 22:56
-
-
Save watzon/9ae85f31052c502af3b548ee27996a95 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# A very basic HTTP server | |
require "http/server" | |
server = HTTP::Server.new(8080) do |context| | |
context.response.content_type = "text/plain" | |
context.response.print "Hello world, got #{context.request.path}!" | |
end | |
puts "Listening on http://127.0.0.1:8080" | |
server.listen |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment