jeudi 7 septembre 2017

Difference between local and server paths in Flask Application

I developed a simple web site with Flask in my local environment and located it in to the "var/www/xxx/". In this directory there is "demo.py" which I start it to run flask application and it automatically see the "templates" folder and it works.

When I want to move this local project to my digital ocean server, I moved this project to under this directory "var/www/xxx/public_html". Then I start the "demo.py" again but this time code cannot be find the "static pages", "templates" folder and lots of other path issue.

I made lots of different path combination but I cannot understand the logic.

Could someone explain me the work of the Flask application and how should I deploy my local project to the server without these complication.




Aucun commentaire:

Enregistrer un commentaire