cmd

command
v0.7.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 15, 2020 License: MIT Imports: 1 Imported by: 0

README

ez-cgi

A friendly and easy to use (almost-)CGI HTTP server.

Installation

There are multiple ways of obtaining ez-cgi:

Brew
brew tap raphaelreyna/homebrew-repo
brew install ez-cgi
Go get
go get -u -v github.com/raphaelreyna/ez-cgi/cmd
Compiling from source
git clone github.com/raphaelreyna/ez-cgi
cd ez-cgi/cmd
sudo make install

Synopsis

Start a (almost-)CGI HTTP server. By default, ez-cgi sends the HTTP client the header 'Content-Type: text/plain'. If the --replace,-r flag is set and the executable doesn't set any headers, a default header will be set (Content-Type: text/plain).

ez-cgi [flags]... executable [args]...

Options

  -C, --cgi                   
                              Conform to the CGI standard (expect for in the handling of the 'Location' header which is ignored.)
                              This flag overrides the --replace, -r flag.
  -d, --dir string            
                              Working directory for the executable.
                              Defaults to where ez-cgi was called.
  -e, --env-var stringArray   
                              Environment variable to pass on to the executable.
                              Must be in the form 'KEY=VALUE'.
  -H, --header stringArray    
                              HTTP header to send to client.
                              To allow executable to override header see the --replace flag.
                              Must be in the form 'KEY: VALUE'.
  -h, --help                  help for ez-cgi
  -p, --port string           
                              Port to bind to. (default "8080")
  -q, --quiet                 
                              Don't show error messages.
  -r, --replace               
                              Allow executable to replace default header values.
                              See also: --cgi, -C.
  -s, --shell string          
                              Which shell ez-cgi should use when a shell command is passed.
                              See also: --shell-command, -S. (default "/usr/bin/sh")
  -S, --shell-command         
                              The argument executable will be interpreted as a shell command.
                              The command will be passed to the shell set by the --shell, -s flag (sh by default).
                              This flag is ignored if the --shell, -S flag is not set.
                              See also: --shell, -S.
  -E, --stderr string         
                              Where to redirect executable's stderr.
      --tls-cert string       
                              Certificate file to use for HTTPS.
                              Key file must also be provided using the --tls-key flag.
      --tls-key string        
                              Key file to use for HTTPS.
                              Cert file must also be provided using the --tls-cert flag.
  -v, --version               
                              Version for ez-cgi.
Auto generated by spf13/cobra on 15-Jun-2020

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
doc
md command

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL