module Spigoter::CLI::Start

Module for starting the server. @author Daniel Ramos Acosta <danielramosacosta@hotmail.com>

Public Class Methods

dependencies() click to toggle source
# File lib/spigoter/cli/cli_start.rb, line 28
def self.dependencies
  if Spigoter::Utils.which('java').nil?
    Log.error "You don't have java in PATH"
    exit(1)
  end
end
main(opts) click to toggle source
# File lib/spigoter/cli/cli_start.rb, line 15
def self.main(opts)
  Log.info 'Starting the server!'
  dependencies
  opts = {}
  begin
    opts = Spigoter::Utils.fill_opts_config
  rescue => e
    Log.error e.message
    exit(1)
  end
  system("java #{opts[:javaparms]} -jar spigot.jar")
end
start() click to toggle source
# File lib/spigoter/cli/cli_start.rb, line 11
def self.start
  ->(opts = {}) { main(opts) }
end