10
11
12
13
14
15
16
17
18
19
20
21
22
|
# File 'lib/jack.rb', line 10
def self.run(app_file, options)
@js = Johnson::Runtime.new
@js.load(File.dirname(__FILE__) + "/jack.js")
Dir.glob(File.dirname(__FILE__) + "/jack/*.js").each { |f| @js.load(f) }
@log = Logger.new(options.log)
@log.info "Starting #{app_file} on http://#{options.host}:#{options.port}"
@js['Jack']['root'] = File.dirname(app_file)
@js['Jack']['log'] = @log @js['Jack']['options'] = {:Port => options.port, :Host => options.host}
@js.load(app_file)
end
|