A fast, reliable and minimal template for FastAPI backend and React.js frontend.
To start of with, make sure you have python 3.10
or above and node v18.16.0
installed.
Run the following:
pip install -r requirements.txt
For Windows :
.\commands.bat
For Mac and Linux systems:
.\commands.sh
This should open a React app instance on localhost:3000
that displays the message from the FastAPI backend.
FastAPI GET http route:
@app.get("/")
def root():
return {"msg": "Ground control to Major Tom 🚀"}
React Frontend:
Further, you can edit the main.py
and the /frontend/component/Message.js
according to your use case and use the template to its fullest.
- Add Database support