© 2018 SiLeader.
- WSGI support
- Static files support
setting format is supporting JSON or TOML.
setting file specified by -s
or --setting
option.
PROGRAM --setting path/to/setting.toml path/to/setting.json
name | description |
---|---|
static | static file server (return file like html or css) |
wsgi | WSGI server |
option | required | type | description |
---|---|---|---|
host | yes | str | host name (e.g. "localhost", "127.0.0.1") |
port | yes | int | port number |
headers | no | [str] or {str:str} | HTTP response header |
options.version | no | bool | show server version in header (default=True) |
option | required | type | description |
---|---|---|---|
script | yes | str | script file name |
object/app | yes | str | WSGI object name |
package | yes | str | package directory path |
option | required | type | description |
---|---|---|---|
root | yes | str | document root |
index | no | str | file name to be used when requested to the directory (default="index.html") |
completion | no | str | automatically complement file extension (default=disabled) |
ex1. completion = ".html"
/index
=> index.html
/index.html
=> index.html
ex2. completion = "html"
/index
=> index.html
/index.html
=> index.html
ex3. completion = ".css"
/index
=> index.css
/index.html
=> index.html
Apache License 2.0