Module: Thick

Defined in:
lib/thick/java.rb,
lib/thick/thick.rb,
lib/thick/buffer.rb,
lib/thick/loader.rb,
lib/thick/version.rb,
lib/thick/websocket.rb

Defined Under Namespace

Modules: Java Classes: Buffer, Loader, WebSocket

Constant Summary collapse

VERSION =
'0.0.8'

Class Method Summary collapse

Class Method Details

.create(options) ⇒ Object



3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# File 'lib/thick/thick.rb', line 3

def self.create(options)

  options = {
      :address => '0.0.0.0',
      :port => 9292,
      :environment => 'development',
      :directory => Dir.getwd,
      :file => 'config.ru'
  }.merge(options)

  puts "* Starting Thick: #{options.inspect}"

  env = Thick::Java::ServerEnvironment.new
  env.address = options[:address]
  env.port = options[:port]

  env.application = Loader.new(options)

  Thick::Java::Server.new(env).start

end