Using Concurrently with React and Flask

Issue

I’ve used Concurrently to run my React frontend at the same time as my Express backend with something like the line written below. I always have a client folder with my react app, and a server folder with my express code

"concurrently \"nodemon server/server.js\" \"npm run start --prefix client\""

now I’m trying to learn flask and run my frontend at the same time as my Flask backend with the line below. I have the same folder format with client having my react app and the server folder with my flask app

"concurrently \"npm run start --prefix client\" \"cd server/venv flask run\""

however when I run the code above, the console outputs "cd server/venv flask run exited with code 0". I am wondering if it is possible to run my react and flask at the same time with concurrently or is there a better way I should be running this? Let me know if I should edit to better explain something.

Solution

If this ever helps anyone:

"concurrently \"npm run start --prefix client\" \"cd server/venv && flask run\""

I forgot to add the "&&" before "flask run"

Answered By – sinafarheidar12

This Answer collected from stackoverflow, is licensed under cc by-sa 2.5 , cc by-sa 3.0 and cc by-sa 4.0

Leave a Reply

(*) Required, Your email will not be published