Sha256: 205ec4c9aeb17a89a0302009e970c0dc3ff15fcc5c19b05a33c8ec2c5e535c2f

Contents?: true

Size: 656 Bytes

Versions: 5

Compression:

Stored size: 656 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'
  invoke_cmd 'yarn_install'
  require 'geordi/util'

  Interaction.announce 'Booting a development server'
  port ||= options.port
  Interaction.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

5 entries across 5 versions & 1 rubygems

Version Path
geordi-3.2.0 lib/geordi/commands/server.rb
geordi-3.1.0 lib/geordi/commands/server.rb
geordi-3.0.3 lib/geordi/commands/server.rb
geordi-3.0.2 lib/geordi/commands/server.rb
geordi-3.0.1 lib/geordi/commands/server.rb