1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-04-22 10:22:08 +02:00
tldr/pages/common/waitress-serve.md
Vitor Henrique d79a1667e3
pages*: refine wording (#12132)
* pages*: refine wording

---------

Co-authored-by: Sebastiaan Speck <12570668+sebastiaanspeck@users.noreply.github.com>
Co-authored-by: Juri Dispan <juri.dispan@posteo.net>
Co-authored-by: K.B.Dharun Krishna <kbdharunkrishna@gmail.com>
Co-authored-by: Lena <126529524+acuteenvy@users.noreply.github.com>
2024-02-09 19:25:36 +05:30

739 B

waitress-serve

Pure Python WSGI HTTP Server. More information: https://docs.pylonsproject.org/projects/waitress/en/latest/runner.html.

  • 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}}

  • Use the HTTPS URL scheme:

waitress-serve --url-scheme={{https}} {{import.path:wsgi_func}}