$ gateway -help
gateway is a basic dynamic webserver that delegates handling of HTTP requests
to executables on disk using the Common Gateway Interface (CGI).
For example, an executable with the basename qux is responsible for handling a
request for the /qux HTTP resource. An executable with the special basename _
is responsible for handling a request for the / HTTP resource (i.e. the
homepage).
An executable handles a request by writing HTTP headers (Status, Content-Type,
...) followed by some content (likely HTML) to standard output, and then
exiting. CGI information is conveyed to executables using environment variables
with standard names - see http://www.cgi101.com/book/ch3/text.html
Go's standard library does the heavy-lifting.
usage:
gateway [flags] /path/to/executables/dir
flags:
-copyenv
child processes get a copy of the server's environment variables
-port int
tcp port number on which to listen for connections (default 80)
-wildcard
have _ perform double-duty and also handle any HTTP resource that isn't
otherwise handled
-withenv string
child processes get exactly these environment variables, specified in
the form k0=v0,k1=v1,...
-
Notifications
You must be signed in to change notification settings - Fork 0
frou/gateway
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
Basic dynamic (CGI) webserver
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published