Sha256: b07104832626728238d0f47afb3a7c4cc26c5dfb40059b0f106bda51cd04e544

Contents?: true

Size: 624 Bytes

Versions: 13

Compression:

Stored size: 624 Bytes

Contents

desc 'server [PORT]', 'Start a development server'

option :port, :aliases => '-p', :default => '3000',
  :desc => 'Choose a port'
option :public, :aliases => '-P', :type => :boolean,
  :desc => 'Make the server accessible in the local network'

def server(port = nil)
  invoke_cmd 'bundle_install'
  require 'geordi/util'

  announce 'Booting a development server'
  port ||= options.port
  note "URL: http://#{ File.basename(Dir.pwd) }.vcap.me:#{port}"
  puts

  command = Util.server_command
  command << ' -b 0.0.0.0' if options.public
  command << ' -p ' << port
  Util.system! command
end

map 'devserver' => 'server'

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
geordi-1.10.0 lib/geordi/commands/server.rb
geordi-1.9.1 lib/geordi/commands/server.rb
geordi-1.9.0 lib/geordi/commands/server.rb
geordi-1.8.0 lib/geordi/commands/server.rb
geordi-1.7.1 lib/geordi/commands/server.rb
geordi-1.7.0 lib/geordi/commands/server.rb
geordi-1.6.5 lib/geordi/commands/server.rb
geordi-1.6.4 lib/geordi/commands/server.rb
geordi-1.6.3 lib/geordi/commands/server.rb
geordi-1.6.2 lib/geordi/commands/server.rb
geordi-1.6.1 lib/geordi/commands/server.rb
geordi-1.6.0 lib/geordi/commands/server.rb
geordi-1.5.2 lib/geordi/commands/server.rb