Class: WhiteCastle
- Inherits:
-
Object
- Object
- WhiteCastle
- Defined in:
- lib/white_castle.rb
Class Method Summary collapse
Class Method Details
.start(options) ⇒ Object
19 20 21 22 23 24 25 26 27 28 29 30 31 32 |
# File 'lib/white_castle.rb', line 19 def self.start() = {:port => 3000, :document_root => "."} = .merge() server = WEBrick::HTTPServer.new( :Port => [:port], :DocumentRoot => [:document_root], :FancyIndexing => true ) server.mount '/nocache', NonCachingFileHandler trap('INT') { server.stop } server.start end |