Change Flask Root Folder for Templates and Static Files

Today I was facing a problem, I didn’t know how to change Flask root directory. Flask by default look for templates and static files under the root directory (/), how can we change that? Changing the root path Here’s my directory structure: . ├── api_files │ ├── static │ │ └── style.css │ └── templates │ └── index.html ├── api.py ├── Pipfile └── Pipfile.lock 3 directories, 5 files I want Flask to be able to process the folders static and templates inside the api_files folder, my main Flask app is api....

<span title='2018-05-12 13:55:57 +0000 UTC'>May 12, 2018</span>&nbsp;·&nbsp;1 min&nbsp;·&nbsp;Franccesco Orozco