Last active
May 11, 2019 20:24
-
-
Save watzon/bad8223c0b0f567c7b8236bb719f2413 to your computer and use it in GitHub Desktop.
Doing Crystal #1: A Ruby Comparison
This file contains hidden or 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 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(8080) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment