Search code examples
reactjspython-3.xmysql-workbenchcrud

Build a app with Flask, ReactJS and MySQL Workbench


I just started with Python this month and I want to know how to build a CRUD with a Flask-like backend and ReactJS-like frontend, using a database from MySQL Workbench and show API. I just want to refer to one project, so please help me! thanks for all!

I tried to build a CRUD by Python Flask and a CRUD by ReactJS but I don't know how to combine it in one project!


Solution

  • You need to run the Flask server and configure it with a database e.g. MySQL in your case using an ORM like SQLAlchemy.

    Then if you have created APIs in Flask, you can use call these APIs at localhost e.g. http://127.0.0.1:5000 from React using something like Axios.

    If you want to combine these services, then you can explore Docker.