class Nopoint::Commands::Serve

Public Class Methods

process(options = {}) click to toggle source
# File lib/nopoint/commands/serve.rb, line 4
def self.process(options = {})
        require 'webrick'

        root = File.expand_path('public', Dir.pwd)
        server = WEBrick::HTTPServer.new(
                :Port => 2337,
                :DocumentRoot => root
        )

        trap('INT') { server.shutdown }
        server.start
end