Hacker News new | ask | show | jobs
by Lunrtick 1800 days ago
I'm currently loving FastAPI and Sqlalchemy, but I have been looking for TypeScript equivalents - TS is such a nice language to work with.

What libraries are you using? I haven't found anything that seems to match the easy OpenAPI schema generation and validation that FastAPI and Pydantic provide.

1 comments

For API backends mostly Express + postgraphile (basic CRUD operations) + socket.io (realtime features). Currently exploring Prisma 2 as replacement for Knex.js (query builder). Knex.js does everything I need except having automatic TypeScript integration. Prisma 2 has fantastic TypeScript integration but lacks many features.

I write my own validation logic and use the same code on the frontend (React+MobX) and backend. Automatic API docs are less important for me as I don't have third party API access and use TypeScript interfaces as API contracts. I run my own business and stuff like validation is something I write only once, and perhaps update and extend every now and then. If you develop many projects for external clients, this setup might be to involved and I can see why something like FastAPI is a timesaver.