Class: Falqon::Pro::CLI::Web

Inherits:
CLI::Base
  • Object
show all
Defined in:
lib/falqon/pro/cli/web.rb

Overview

Start the web interface

Usage:

falqon web

Options:

-h, [--host=HOST]                    # Host (default: 127.0.0.1)
-p, [--port=PORT]                    # Port (default: 3000)
-d, [--daemonize], [--no-daemonize]  # Run in the background
-i, [--pid=PID]                      # File to store pid
    [--debug], [--no-debug]          # Set debugging flags
-O, [--options=one two three]        # Pass options to the server in the format of NAME=VALUE NAME2=VALUE2

Examples:

Start the web interface

$ falqon web

Instance Method Summary collapse

Instance Method Details

#executeObject



26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# File 'lib/falqon/pro/cli/web.rb', line 26

def execute
  # Start the app with Padrino::Server
  require "padrino-core/cli/launcher"

  # Remove the "web" command
  ARGV.shift

  # Add the "start" command
  ARGV.unshift("start") if ARGV.first.nil? || ARGV.first.start_with?("-")
  Padrino::Cli::Launcher.start ARGV

  # Start the app with Rackup::Server
  # require "rackup/server"
  # Rackup::Server.start
end

#validateObject



24
# File 'lib/falqon/pro/cli/web.rb', line 24

def validate; end