Python flag server adds another port to the domain

Initial condition: I have a Python Flask server running on a remote computer that I access through the Linux command line (OpenSuse). The server is working fine. It displays html for xyz.com/10000.

Problem: I added a new user. I want the server to read my .py files. What am I doing? Do I need a new port number? Or will it be xyz.myusername.com/10000? What configurations do I need to change? Should the superuser intervene?

Thanks!

+8
flask port multi-user
source share
2 answers

The server built into the flask is not intended for use in production - or at least the documentation refers to it as a local development server.

For production, something like Tornado, gunicorn, or even Apache is what you will need to use.

See also: Flags documentation covering the Flask.run() method .

However, this is just a Python program. There is no reason why you could not run your own on another port via app.run(port=5001) .

+23
source share

Can you tell us more about your problem? What do you mean by the word "you are a new user added" - which user is added? What do you mean by “server to read your .py files” - the server as the remote computer you are referring to, or the server as the http dev flags server or something else? Without an accurate description of your environment (for example, the type of OS), what you want to achieve (instead, ask if you should do X or Y) and what problem you are performing (not knowing how your software, for example, working with a flask, doesn’t is a real problem) we cannot help you.

0
source share

All Articles