I have written a Python Dash Application and it works completely fine on my local computer. Now, I want to be able to deploy this application on a server within the corporate network. I do NOT want to deploy this on Heroku etc because the datasource is an internal API. How do I go about deploying this application on the server? It's a Linux based machine.
I found this post that says use the code below but not quite sure where to add this piece of code.
waitress-serve --host=0.0.0.0 --port=8080 appname:app.server
CodePudding user response:
The code you are referring to, waitress-serve
, is a command-line wrapper bound to the function waitress.serve
provided by Waitress.
You run it in your terminal or from a shell script.
Waitress is a production-quality pure-Python WSGI server with very acceptable performance. It has no dependencies except ones which live in the Python standard library. It runs on CPython on Unix and Windows under Python 3.7 .
You can install it with pip install waitress
.
@see waitress-serve
documentation here.