8

Initial Condition: I have a Python Flask server running on a remote machine that I am accessing via Linux(OpenSuse) command line. The server works perfect. It renders the html for xyz.com:5000.

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

Thanks!

2 Answers 2

24

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).

0

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.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.