cmd/stepd: Add ability to specify error document
This commit is contained in:
parent
a7b360cc09
commit
006a311aeb
@ -21,6 +21,10 @@ func main () {
|
||||
'a', "address",
|
||||
"The address to host the server on",
|
||||
":8080", cli.ValString)
|
||||
flagErrorDocument := cli.NewInputFlag (
|
||||
0, "error-document",
|
||||
"The document to use for displaying errors",
|
||||
"", cli.ValString)
|
||||
flagDirectories := cli.NewFlag (
|
||||
'd', "directories",
|
||||
"Serve the contents of directories")
|
||||
@ -47,10 +51,11 @@ func main () {
|
||||
|
||||
// set up the HTTP handler
|
||||
handler := stephttp.Handler {
|
||||
Environment: &environment,
|
||||
Directories: flagDirectories.Value == "true",
|
||||
StepExt: ucontainer.NewSet(".step"),
|
||||
Index: []string { "index.step", "index.html", "index" },
|
||||
Environment: &environment,
|
||||
Directories: flagDirectories.Value == "true",
|
||||
StepExt: ucontainer.NewSet(".step"),
|
||||
Index: []string { "index.step", "index.html", "index" },
|
||||
ErrorDocument: flagErrorDocument.Value,
|
||||
}
|
||||
|
||||
// set up the HTTP server
|
||||
|
Loading…
Reference in New Issue
Block a user