-1

So i made a react website that fetches data from my flask app, it works on my localhost without any problem,i know that to host the react app on ovh i just need to copy the build folder but i don't know how to host the flask app.

I tried hosting the flask app on pythonanywhere but since the flask app uses os.listdir() to scan some assets i can't host it.

I also tried to host it on ovh but apparently i can't do that with a normal hosting plan.

How can i host this flask app ?

Bachir
  • 3
  • 1

2 Answers2

0

I have some experience working with file assets in the Flask app. Heroku worked for me.

But if you want to have an advanced setup, you can use Docker and deploy it to any cloud service.

Deploy Flask App on Heroku https://www.jcchouinard.com/deploy-a-flask-app-on-heroku/

My project with Flask + Heroku https://github.com/alfanme/dts-deployment-ann

Hope it helps!

Ahmad Alfan
  • 321
  • 1
  • 2
0

Ahmad Alfan's answer works well, but the problem is that a normal ovh subscription only supports php and not python, so i converted my code to php.

Bachir
  • 3
  • 1
  • Your answer could be improved with additional supporting information. Please edit to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers in the help center. – DSDmark Jun 04 '23 at 05:05