NAME

Slovo::Command::Author::generate::cgi_script - Generate a CGI script for running Slovo under Apache 2/CGI

SYNOPSIS

  Usage: slovo [OPTIONS]
  # Default values.
  slovo generate cgi_script
  # Custom values
  slovo generate cgi_script -f slovo.cgi -m production

Options:
  -h, --help            Show this summary of available options
  -f, --filename <name> Defaults to $app->moniker.cgi
  -c, --cgi_mode <name> Defaults to current $app->mode
  -m, --mode     <name> Operating mode for your application, defaults to the
                        value of MOJO_MODE/PLACK_ENV or "development". Will
                        be used for --cgi_mode.

DESCRIPTION

After running this command it is expected usually to run also Slovo::Command::Author::generate::a2htaccess to generate the .htaccess file for the set of domains which you will be running on this virtual host.

Slovo::Command::Author::generate::cgi_scrip will generate a CGI script for running Slovo under Apache2/CGI. Although Slovo performs best as a daemon, run by hypnotoad, it can as well be used on a cheap shared hosting. When the produced CGI script (e.g. slovo.cgi) is run on a page from the site, it will dump the produced on-the-fly HTML to a static html-file. Later, upon another HTTP request, the produced html-file will be just spit out by Apache without invoking slovo.cgi again. This way Slovo acts as a static site generator. This is completely enough for bloggers. Serving static pages is faster than anything else.

ATTRIBUTES

Slovo::Command::Author::generate::cgi_script inherits all attributes from Slovo::Command and implements the following new ones.

description

my $description = $cgi_script->description;
$cpanify        = $cgi_script->description('Foo');

Short description of this command, used for the command list.

usage

my $usage = $cgi_script->usage;
$cpanify  = $cgi_script->usage('Foo');

Usage information for this command, used for the help screen.

METHODS

Slovo::Command::Author::generate::cgi_script inherits all methods from Slovo::Command and implements the following new ones.

run

$cgi_script->run(@ARGV);

Run this command.

SEE ALSO

Slovo::Command::Author::generate::a2htaccess, Slovo,Mojolicious::Command "Adding-commands-to-Mojolicious" in Mojolicious::Guides::Cookbook, Mojolicious::Guides, https://слово.бг.