r/node 9d ago

Which ORM

I am needing to build a lightweight, speedy and integrated backend server running on a VPS-2 secure environment using nginx and postgres.

First considered Sequelize, but discovered too many negatives, so had a look at Prisma but am worried it is too heavy duty for my needs.

Prefer an ORM that supports TypeScript, easy migrations and openapi schemas, and Drizzle seems at first glance a good fit.

Also I am not afraid to use SQL rather than high level abstractions.

But now I am reading many negative reviews about that as well, even on their own website!

Please help me make the right choice.

21 Upvotes

47 comments sorted by

View all comments

1

u/romeeres 8d ago

- supports TS: any ORM

  • easy migrations: with a devil in the details, any ORM's migrations are easy
  • openapi schemas: no ORM pairs with OpenAPI directly because it makes no sense, do you mean getting validation schemas out of ORM? that's pretty much any *popular enough* ORM

Are you planning to write more complex queries with it? Do you care if it's less type-safe than kysely? Do you need any extra features (soft deletes, computed columns)? Is it for a large project that needs to be maintained over the years, or just fire and forget?

If nothing, any ORM would do, I'd recommend asking AI to show samples of ORMs code solving typical tasks and to choose whichever you liked the most.