mirror of
https://github.com/tldr-pages/tldr.git
synced 2025-06-05 12:45:59 +02:00
waitress-serve: add page (#2451)
This commit is contained in:
parent
440bfe44c0
commit
9ef7ec119a
1 changed files with 27 additions and 0 deletions
27
pages/common/waitress-serve.md
Normal file
27
pages/common/waitress-serve.md
Normal file
|
@ -0,0 +1,27 @@
|
|||
# waitress-serve
|
||||
|
||||
> Pure Python WSGI HTTP Server.
|
||||
|
||||
- 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}}`
|
||||
|
||||
- Set the URL scheme to https:
|
||||
|
||||
`waitress-serve --url-scheme={{https}} {{import.path:wsgi_func}}`
|
Loading…
Add table
Reference in a new issue