Sha256: 3da8e03f9e4b858cfe007a590b9832f606f3fe7f9ec75a314fd48435ffa8b0a3

Contents?: true

Size: 417 Bytes

Versions: 3

Compression:

Stored size: 417 Bytes

Contents

#!/usr/bin/ruby

require 'net/ajp13server'

# This server always returns "Hello, World!"
class HelloServer < Net::AJP13::Server
  def process_request(req)
    logger.info("Requested from #{req.remote_host}:#{req.remote_addr}")
    res = Net::AJP13::Response.new(200)
    res['Content-Type'] = 'text/plain'
    res.body = 'Hello, World!'

    return res
  end
end

serv = HelloServer.new('localhost', 3009)
serv.start

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
ruby-ajp-0.2.1 example/hello-server.rb
ruby-ajp-0.2.0 example/hello-server.rb
ruby-ajp-0.1.5 example/hello-server.rb