1

My file structure is as follows

api --> where all my flask api is 
build 
src
package.json

I have successfully made a git repository out of the api and pushed it to my heroku account. I am having trouble deploying the front end with this file structure. Blog posts and youtube videos I have came across show deployment with the python file inside of the main folder and not structured in a different folder of its own. I was wondering how I should go about deploying with this file structure. This is the first time I am deploying and I would be grateful if someone could walk me through it.

Ali Naji
  • 43
  • 1
  • 4

1 Answers1

0

This is my deployment of angular project with flask. But most of the procedure is same for react also. Link

Keep Procfile, wsgi.py and runtime.txt in root along with package.json. Do changes in wsgi.py import statement.

fatalcoder524
  • 1,428
  • 1
  • 7
  • 16
  • I changed my folder structure but now again the api gets deployed but the react frontend doesn't. It gives me this error :The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again. – Ali Naji Sep 13 '21 at 12:58
  • @AliNaji Check your routes or static file location you have set in flask app. – fatalcoder524 Sep 14 '21 at 05:58