Class: ServerCommand
- Inherits:
-
Object
- Object
- ServerCommand
- Defined in:
- lib/commands/server_command.rb
Instance Method Summary collapse
-
#initialize(options) ⇒ ServerCommand
constructor
A new instance of ServerCommand.
- #run ⇒ Object
Constructor Details
#initialize(options) ⇒ ServerCommand
Returns a new instance of ServerCommand.
2 3 4 |
# File 'lib/commands/server_command.rb', line 2 def initialize() @options = end |
Instance Method Details
#run ⇒ Object
6 7 8 9 10 11 12 13 |
# File 'lib/commands/server_command.rb', line 6 def run ENV["RACK_ENV"] = "production" require "server/server_app" Rack::Handler::WEBrick.run( Sinatra::Application, :Port => @options[:server_port], ) end |