FastAPI 0.141.0 Adds `app.frontend()` for Simplified Local Development

FastAPI · 29 Jul 2026 · 2 min read

#fastapi

FastAPI 0.141.0 has been released, bringing a new feature that enhances the local development experience. The highlight is the addition of app.frontend(check_dir="auto"), which automatically serves a frontend directory when using the fastapi dev command. This eliminates the need for manual configuration of static file mounting during development.

Key changes in this release:

  • app.frontend(check_dir="auto"): This new method automatically detects and serves a frontend directory (e.g., a frontend folder) when running the app with fastapi dev. It simplifies the setup for developers building full-stack applications with FastAPI.
  • The feature is designed to work with fastapi dev, making it easier to iterate on both backend and frontend code simultaneously.
  • The PR (#16102) by @tiangolo implements this change based on community feedback to improve the developer experience for local development.

This release is particularly useful for developers who work on projects where the frontend is served separately (e.g., with React, Vue, or Svelte). By automating the frontend serving process, FastAPI reduces boilerplate and speeds up the development cycle. Instead of manually configuring a StaticFiles mount or using a reverse proxy, you can now simply call app.frontend() and start developing.

Note that this feature is specifically intended for local development convenience and may not be suitable for production deployments, where more robust static file serving methods are recommended.

For a full list of changes, see the original release notes.

Source: https://github.com/fastapi/fastapi/releases/tag/0.141.0

Related

auto-curated · source linked above ← all news