FastAPI can now serve your frontend app ✨ With support for client-side routing 😎 Great for React with TanStack Router, Astro static builds, Vite-based apps, etc. 🎉 FastAPI version 0.138.0 🔖 fastapi.tiangolo.com/tutoria…

Jun 20, 2026 · 1:18 AM UTC

34
137
1,596
153,491
Teach your agent to use it with the embedded skill in FastAPI 🤖
1
59
5,322
Sort replies: Relevant Recent Liked
Replying to @FastAPI
Main advantage of this approach than the normal build??
1
3
2,953
You still build as normally, this is only for serving the already built frontend app, respecting client-site routing while also respecting your API path operations.
1
14
2,579
Replying to @FastAPI
How do we do it before?
1
2
3,026
Maybe with StaticFiles, losing client-side routing, or with some good amount of custom logic to get close to something like this, maybe with an additional external static file server like Nginx, handling separation of API and frontend by path in a termination proxy, or by domain.
13
2,711
Replying to @FastAPI
I'm guessing next js is not supported since it was not mentioned?
1
1,084
Only with a static build output. But not in SSR mode as that requires executing Node.js in the backend.
5
879
Replying to @FastAPI
how it's diff from normal static files serving?
1
433
It supports client-side routing, serving the index.html as a fallback.
395
Replying to @FastAPI
it always could? I'm confused
1
898
StaticFiles didn't support client-side routing by default, as it's common in React and other frameworks.
822
Replying to @FastAPI
This is amazing for light weight builds!
6
1,429
Replying to @FastAPI
Not even 1.0 and my entire production stack relies on you ffs
2
203
Replying to @FastAPI
This has been really cool to work with... thanks to the team.
1
1,306
Replying to @FastAPI
🤩 upgrading now
1
883
Replying to @FastAPI
this is great
1
78
Replying to @FastAPI
Love it
1
489
Replying to @FastAPI
Coming home now
1
52
Replying to @FastAPI
The FastAPI ecosystem makes me want to write Python again.
1
230
Replying to @FastAPI
Using this option and scalar document💎 nice❤️
1
19
Replying to @FastAPI
This is awesome! Be nice to namespace to avoid route clashes, but also be nice to have a coupled API + frontend approach.
1
1
610
Replying to @FastAPI
This is great for static builds.
1
57
Replying to @FastAPI
now this is too hard
1
104
Replying to @FastAPI
Runtime @bunjavascript ?
124
Replying to @FastAPI
hit this 404-on-refresh wall with vite last year, cost me like 3hrs. not sure it's great for prod though once the api is serving html, CDN caching on statics gets weird. anyone shipping this solved that without splitting deploys?
842
Replying to @FastAPI
@DevTalles please add this to python+fastapi course
1
46
Replying to @FastAPI
FastAPI is my favorite framework , it's simple and fast ,i love it
348
Replying to @FastAPI
bro , I'm using next-js 😅
302
Replying to @FastAPI
Interesting
174
Replying to @FastAPI
ほぉ?
22
Replying to @FastAPI
what about dev time compatibility because dist is not auto updating with dev time changes???
130
Replying to @FastAPI
What is this theme
252
Replying to @FastAPI
期待与 Next.js 有更深度、更广泛的融合。🚀
28
Replying to @FastAPI
I could tell you why it’s a bad idea but won’t
137
Replying to @FastAPI
@grok given the SSR capabilities of frameworks like React, what would i use this feature for in FastApi?
1
610