module Itiscold::WebServer
Public Class Methods
start(tty)
click to toggle source
# File lib/itiscold.rb, line 357 def self.start tty root = File.expand_path(File.join File.dirname(__FILE__), 'itiscold', 'public') mutex = Mutex.new temp = Itiscold.open tty server = WEBrick::HTTPServer.new(:Port => 8000, :DocumentRoot => root) server.mount "/samples", SampleServlet, temp, mutex server.mount "/info", InfoServlet, temp, mutex trap "INT" do server.shutdown end server.start end