/fastapi-webapp-react

A template for a web app built w/ FastAPI, React.js and typescript

Primary LanguageTypeScript

WebApp Template w/ FastAPI, React.js and Typescript

This is a template for a Webapp using React.js and Typescript for the UI and FastAPI as the API.

Getting Started

  1. Install UI dependencies and build app
# run from ui/ directory
npm install
npm run build
  1. Install API dependencies
# run from api/ directory
pip install -r requirements.txt
  1. Start the API
# run from api/ directory
uvicorn main:app --reload
  1. Test your setup
  • In a browser navigate to
    • localhost:8000/api/health this should return { "status": "healthy" }
    • localhost:8000/ this should return a web page that says Home
    • localhost:8000/test this should return a web page that says Test