Python Flask server add another port to domain Python Flask server add another port to domain flask flask

Python Flask server add another port to domain


Flask's built-in server is not intended for production use - 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'll need to be using.

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

That said - it's just a Python program. There's no reason you couldn't run your own on a different port via app.run(port=5001).


Can you be a bit more specific about your issue? What do you mean by 'you are a new user added' - what user, where added? What do you mean by 'the server to read your .py files' - server as the remote machine you're referring to, or server as Flask http dev server, or something else? Without precise description of your environment (OS type for example), what you want to achieve (instead asking should you do X or Y) and what problem you're ecountering (not knowing how your software, like Flask works is not actual problem) we wont be able to help you.