Add sane sinatra defaults for the web services
This commit is contained in:
@@ -7,6 +7,11 @@ module SharpCoin
|
||||
#
|
||||
# @author Nick Thomas <nick@lupine.me.uk>
|
||||
class JsonRpc < Sinatra::Base
|
||||
set :environment, :production
|
||||
disable :sessions, :logging, :run, :dump_errors, :raise_errors, :lock
|
||||
enable :method_override, :static, :show_exceptions
|
||||
|
||||
set :root, File.join(File.dirname(__FILE__), 'web')
|
||||
end
|
||||
JsonRPC = JsonRpc
|
||||
JSONRPC = JsonRpc
|
||||
|
@@ -7,6 +7,11 @@ module SharpCoin
|
||||
#
|
||||
# @author Nick Thomas <nick@lupine.me.uk>
|
||||
class Rest < Sinatra::Base
|
||||
set :environment, :production
|
||||
disable :sessions, :logging, :run, :dump_errors, :raise_errors, :lock
|
||||
enable :method_override, :static, :show_exceptions
|
||||
|
||||
set :root, File.join(File.dirname(__FILE__), 'web')
|
||||
end
|
||||
REST = Rest
|
||||
end
|
||||
|
@@ -1,4 +1,5 @@
|
||||
require 'sinatra/base'
|
||||
require 'sharp-coin/interface/json-rpc'
|
||||
require 'sharp-coin/interface/rest'
|
||||
|
||||
module SharpCoin
|
||||
@@ -12,7 +13,11 @@ module SharpCoin
|
||||
#
|
||||
# @author Nick Thomas <nick@lupine.me.uk>
|
||||
class WebReal < Sinatra::Base
|
||||
set :environment, :production
|
||||
disable :sessions, :logging, :run, :dump_errors, :raise_errors, :lock
|
||||
enable :method_override, :static, :show_exceptions
|
||||
|
||||
set :root, File.join(File.dirname(__FILE__), 'web')
|
||||
end
|
||||
|
||||
Web = Rack::Builder.new do
|
||||
|
Reference in New Issue
Block a user