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
require 'humane' | |
server = HB::Server.new # use "include HB" for even more fun | |
server.path "/" do # Hello world, HB style | |
write true, "h1. Hello, world!" # write() = puts() for the web; hx. = <hx></hx> | |
write true, "The URL you entered was '%s'" % url # Just pop that word in there and enjoy | |
end | |
server.path "/submit" do |name| # auto-magically gives you POST/GET-ed variables |