Class: Ronin::Web::CLI::Commands::New::Server Private
- Inherits:
-
Ronin::Web::CLI::Command
- Object
- Core::CLI::Command
- Ronin::Web::CLI::Command
- Ronin::Web::CLI::Commands::New::Server
- Includes:
- Core::CLI::Generator
- Defined in:
- lib/ronin/web/cli/commands/new/server.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Creates a new ronin-web-server script.
Usage
ronin-web server [options]
Options
-H, --host HOST|IP Optional host or IP interface to listen on. Defaults to 0.0.0.0.
-p, --port PORT Optional port to listen on. Defaults to 8000.
-h, --help Print help information
Arguments
FILE The file to create
Instance Method Summary collapse
-
#run(path) ⇒ Object
private
Runs the
ronin-web new server
command.
Instance Method Details
#run(path) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Runs the ronin-web new server
command.
83 84 85 86 87 88 89 |
# File 'lib/ronin/web/cli/commands/new/server.rb', line 83 def run(path) @host = [:host] @port = [:port] erb 'server.rb.erb', path chmod '+x', path end |