Sha256: 52e638622d0370c129421b38343177ac5b79d2f3e38357fc47e8798b00373eb0

Contents?: true

Size: 808 Bytes

Versions: 11

Compression:

Stored size: 808 Bytes

Contents

require 'rubygems'
ROOT_DIR = File.dirname(__FILE__)
$LOAD_PATH.unshift("#{ROOT_DIR}/lib")
$LOAD_PATH.unshift("#{ROOT_DIR}/server")

require 'sinatra/base'
require 'extensions/object'
require 'extensions/hash'
require 'app'
require 'mirage/client'

module Mirage
  class Server < Sinatra::Base
    configure do
      options = Hash[*ARGV]
      set :defaults, options["defaults"]
      set :port, options["port"]
      $0="Mirage Server port #{settings.port}"
      set :show_exceptions, false
      set :logging, true
      set :dump_errors, true
      set :server, 'webrick'
      set :views, "#{ROOT_DIR}/views"

      log_file = File.open('mirage.log', 'a')
      log_file.sync=true
      use Rack::CommonLogger, log_file
      enable :logging
    end
  end
end


Mirage::Server.run! :server => 'webrick'

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
mirage-3.0.0.alpha.11 mirage_server.rb
mirage-3.0.0.alpha.10 mirage_server.rb
mirage-3.0.0.alpha.9 mirage_server.rb
mirage-3.0.0.alpha.8 mirage_server.rb
mirage-3.0.0.alpha.7 mirage_server.rb
mirage-3.0.0.alpha.6 mirage_server.rb
mirage-3.0.0.alpha.5 mirage_server.rb
mirage-3.0.0.alpha.4 mirage_server.rb
mirage-3.0.0.alpha.3 mirage_server.rb
mirage-3.0.0.alpha.2 mirage_server.rb
mirage-3.0.0.alpha.1 mirage_server.rb