mercredi 28 janvier 2015

How to run Flask app on website

I'm very new in Flask. I work on a simple searching app in dictionary which is saved in memory while the app runs. For testing this application, I use Flask framework which runs a server on a localhost when I run the *.py file. When I start the Flask script, I can see my webpage in a browser and use the application properly.



if __name__ == '__main__':
setup()
app.run()


Now, I want to put it on the Internet to have remote access. I know that just copy+paste it to a directory on some hosting which supports Python would not work. I will appreciate any advices how to make this work.


I suppose, that it should be saved somewhere on the host directory and then I should start the app - app.run(I don't know what to type here as host and port). Or is there another way?


I want just type http://[some url where my app runs] and see the html stored in flask templates file.





Aucun commentaire:

Enregistrer un commentaire