Class: Mockly::Command

Inherits:
MisterBin::Command
  • Object
show all
Defined in:
lib/mockly/command.rb

Instance Method Summary collapse

Instance Method Details

#runObject



16
17
18
19
20
21
22
23
24
25
26
27
# File 'lib/mockly/command.rb', line 16

def run
  port = (args['--port']).to_i
  host = args['--host']
  mock_root = File.expand_path args['--root']

  App.set :bind, host
  App.set :port, port
  App.set :mock_root, mock_root
  App.set :asset_root, File.join(mock_root, 'assets')

  App.run!
end