2018-10-16 18:29:26 +01:00
|
|
|
# waitress-serve
|
|
|
|
|
|
|
|
> Pure Python WSGI HTTP Server.
|
2022-07-27 12:38:46 +01:00
|
|
|
> More information: <https://docs.pylonsproject.org/projects/waitress/en/latest/runner.html>.
|
2018-10-16 18:29:26 +01:00
|
|
|
|
|
|
|
- Run a Python web app:
|
|
|
|
|
|
|
|
`waitress-serve {{import.path:wsgi_func}}`
|
|
|
|
|
|
|
|
- Listen on port 8080 on localhost:
|
|
|
|
|
|
|
|
`waitress-serve --listen={{localhost}}:{{8080}} {{import.path:wsgi_func}}`
|
|
|
|
|
|
|
|
- Start waitress on a Unix socket:
|
|
|
|
|
|
|
|
`waitress-serve --unix-socket={{path/to/socket}} {{import.path:wsgi_func}}`
|
|
|
|
|
|
|
|
- Use 4 threads to process requests:
|
|
|
|
|
|
|
|
`waitress-serve --threads={{4}} {{import.path:wsgifunc}}`
|
|
|
|
|
|
|
|
- Call a factory method that returns a WSGI object:
|
|
|
|
|
|
|
|
`waitress-serve --call {{import.path.wsgi_factory}}`
|
|
|
|
|
2024-02-09 13:55:36 +00:00
|
|
|
- Use the HTTPS URL scheme:
|
2018-10-16 18:29:26 +01:00
|
|
|
|
|
|
|
`waitress-serve --url-scheme={{https}} {{import.path:wsgi_func}}`
|