Sha256: 2b7d6905e9a1886e60b0384072771de916dc24872329dcde97d31d04fbde0bd0

Contents?: true

Size: 543 Bytes

Versions: 52

Compression:

Stored size: 543 Bytes

Contents

require 'pp'
require 'rack/builder'
require 'mizuno/server'

app = Rack::Builder.new {
  map "/" do
    run lambda {|env| [200, {'Content-Type' => 'text/plain'}, ['Testing for Glassfish']] }
  end
}

pp 'starting server....'
mizuno = nil
server = Thread.new do
  mizuno = Mizuno::Server.new
  mizuno.run(app, :embedded => true, :threads => 5, :port => 8080, :host => nil)
end
pp 'success to start mizuno/server'

require 'net/http'

res = Net::HTTP.get('localhost', '/', 8080)
pp res

pp 'ending'
mizuno.stop
server.kill
server.join
pp 'end.'

Version data entries

52 entries across 52 versions & 1 rubygems

Version Path
norikra-1.5.1-java junks/mizuno.rb
norikra-1.5.0-java junks/mizuno.rb
norikra-1.4.0-java junks/mizuno.rb
norikra-1.3.1-java junks/mizuno.rb
norikra-1.3.0-java junks/mizuno.rb
norikra-1.3.0.beta.1-java junks/mizuno.rb
norikra-1.2.2-java junks/mizuno.rb
norikra-1.2.1-java junks/mizuno.rb
norikra-1.2.0-java junks/mizuno.rb
norikra-1.1.2-java junks/mizuno.rb
norikra-1.1.1-java junks/mizuno.rb
norikra-1.1.0-java junks/mizuno.rb
norikra-1.0.8-java junks/mizuno.rb
norikra-1.0.7-java junks/mizuno.rb
norikra-1.0.6-java junks/mizuno.rb
norikra-1.0.5-java junks/mizuno.rb
norikra-1.0.4-java junks/mizuno.rb
norikra-1.0.3-java junks/mizuno.rb
norikra-1.0.2-java junks/mizuno.rb
norikra-1.0.1-java junks/mizuno.rb