mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
12 lines
198 B
Text
12 lines
198 B
Text
|
#!/usr/bin/env ruby
|
||
|
require "webrick/cgi"
|
||
|
|
||
|
class HelloCGI < WEBrick::CGI
|
||
|
def do_GET(req, res)
|
||
|
res["content-type"] = "text/plain"
|
||
|
res.body = "Hello, world.\n"
|
||
|
end
|
||
|
end
|
||
|
|
||
|
HelloCGI.new.start
|