I know that in order to run a Python web application(an application developed with frameworks such as Flask & Django) on the server, you need to deploy it using things such as uwsgi
, wsgi
.. gunicorn
.. etc, and configure it to run with the web servers like apache2
& nginx
.
But, I know that I can just run python my_app.py
and the application will work on the server using the ports like: mywebsite.com:5000
. And I can use a proxy on the web server to redirect mywebsite.com:5000
to something like test.example.com
or any place I want.
So what's the difference between the two ways? Which one should I use?
Thanks.