Class: Nightwatch::CommandLine

Inherits:
Thor
  • Object
show all
Defined in:
lib/nightwatch/web/cli.rb

Instance Method Summary collapse

Instance Method Details

#startObject



11
12
13
14
15
16
17
18
19
20
21
22
23
24
# File 'lib/nightwatch/web/cli.rb', line 11

def start
  if options[:version]
    version
    return
  end

  bind = options[:bind] || '0.0.0.0'  
  port = options[:port] || 3000
 
  server = Nightwatch::Server
  server.set :bind, bind
  server.set :port, port
  server.run!
end

#versionObject



27
28
29
# File 'lib/nightwatch/web/cli.rb', line 27

def version
  puts "Nightwatch #{Nightwatch::VERSION}"
end