Pyjoyment.Command.fastcgi - FastCGI command

Usage: APPLICATION fastcgi [OPTIONS]

  ./myapp.py fastcgi

Options:
  -h, --help                Show this summary of available options
      --home <path>         Path to home directory of your application,
                            defaults to the value of PYJO_HOME or
                            auto-detection
      --log-format <name>   Format of log messages, "text", "plain" without
                            time and process, or "json", defaults to the
                            value of PYJO_LOG_FORMAT or "text"
  -m, --mode <name>         Operating mode for your application, defaults to
                            the value of PYJO_MODE or "development"

Pyjoyment.Command.fastcgi starts applications that a web server starts as FastCGI applications, as Apache with mod_fcgid and lighttpd do: it serves the listen socket that the web server gives the application as the file descriptor 0, with Pyjo.Server.Daemon and Pyjo.Server.FastCGI, and is detected by Pyjoyment.Commands when the file descriptor 0 is such a socket. A FastCGI application that listens on a socket of its own, which the web server connects to, is started with the commands daemon and prefork and a listen location fcgi:// or fcgi+unix://.

This is a core command, that means it is always enabled and its code a good example for learning to build new commands, you’re welcome to fork it.

See Pyjoyment.Commands for a list of commands that are available by default.

See also

Pyjoyment, https://mojolicious.org.

It has no counterpart in Mojolicious; Pyjoyment.Command.cgi is the counterpart of Mojolicious::Command::cgi.

Classes

class Pyjoyment.Command.fastcgi.Pyjoyment_Command_fastcgi(**kwargs: Any)[source]

Pyjoyment.Command.fastcgi inherits all attributes and methods from Pyjoyment.Command and implements the following new ones.

description = 'Start application with FastCGI of the web server'
description = fastcgi.description
fastcgi.description = 'Foo'

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

run(*args: str) → Any[source]
fastcgi.run(*sys.argv[1:])

Run this command.

usage = 'Usage: APPLICATION fastcgi [OPTIONS]\n\n  ./myapp.py fastcgi\n\nOptions:\n  -h, --help                Show this summary of available options\n      --home <path>         Path to home directory of your application,\n                            defaults to the value of PYJO_HOME or\n                            auto-detection\n      --log-format <name>   Format of log messages, "text", "plain" without\n                            time and process, or "json", defaults to the\n                            value of PYJO_LOG_FORMAT or "text"\n  -m, --mode <name>         Operating mode for your application, defaults to\n                            the value of PYJO_MODE or "development"\n'
usage = fastcgi.usage
fastcgi.usage = 'Foo'

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