Sha256: 24cdfe6dba2c77b577c44afbd8b95f00dad63ed9b65e46970bff68e9d4a15dd7

Contents?: true

Size: 835 Bytes

Versions: 19

Compression:

Stored size: 835 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 'app'
require 'extensions/hash'
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"
      set :bind, '0.0.0.0'

      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

19 entries across 19 versions & 1 rubygems

Version Path
mirage-4.0.0.alpha6 mirage_server.rb
mirage-4.0.0.alpha5 mirage_server.rb
mirage-4.0.0.alpha4 mirage_server.rb
mirage-4.0.0.alpha3 mirage_server.rb
mirage-4.0.0.alpha2 mirage_server.rb
mirage-4.0.0.alpha1 mirage_server.rb
mirage-3.0.14 mirage_server.rb
mirage-3.0.13 mirage_server.rb
mirage-3.0.12 mirage_server.rb
mirage-3.0.11 mirage_server.rb
mirage-3.0.10 mirage_server.rb
mirage-3.0.9 mirage_server.rb
mirage-3.0.8 mirage_server.rb
mirage-3.0.7 mirage_server.rb
mirage-3.0.6 mirage_server.rb
mirage-3.0.5 mirage_server.rb
mirage-3.0.4 mirage_server.rb
mirage-3.0.3 mirage_server.rb
mirage-3.0.2 mirage_server.rb