Class: Nopoint::Commands::Serve
- Inherits:
-
Nopoint::Command
- Object
- Nopoint::Command
- Nopoint::Commands::Serve
- Defined in:
- lib/nopoint/commands/serve.rb
Class Method Summary collapse
Class Method Details
.process(options = {}) ⇒ Object
4 5 6 7 8 9 10 11 12 13 14 15 |
# File 'lib/nopoint/commands/serve.rb', line 4 def self.process( = {}) require 'webrick' root = File.('public', Dir.pwd) server = WEBrick::HTTPServer.new( :Port => 2337, :DocumentRoot => root ) trap('INT') { server.shutdown } server.start end |