What is the consensus about using ORM in node js applications?

This page summarizes the projects mentioned and recommended in the original post on /r/node

Our great sponsors
  • SurveyJS - Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • WorkOS - The modern identity platform for B2B SaaS
  • Sequelize

    Feature-rich ORM for modern Node.js and TypeScript, it supports PostgreSQL (with JSON and JSONB support), MySQL, MariaDB, SQLite, MS SQL Server, Snowflake, Oracle DB (v6), DB2 and DB2 for IBM i.

  • On a couple projects I use Sequelize (https://sequelize.org). It handles all the standard ORM stuff including migrations. It also lets you do ad-hoc queries for the more complex stuff. The main thing I like about it is that it makes it easy to spin up a fresh DB for testing because you can just run your migrations on a blank DB that you spin up with Docker. If I use ORM, I use this.

  • proposal-decorators

    Decorators for ES6 classes

  • Decorators are currently an experimental TypeScript-only feature, if the decorators proposal is finalized then it's likely that those will have different semantics than the existing experimental decorators. The TypeScript team would have to make a decision then - keep the existing experimental semantics or remove the existing decorators and implement according to the ECMA spec. It's likely they would do the former.

  • SurveyJS

    Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App. With SurveyJS form UI libraries, you can build and style forms in a fully-integrated drag & drop form builder, render them in your JS app, and store form submission data in any backend, inc. PHP, ASP.NET Core, and Node.js.

    SurveyJS logo
  • Nest

    A progressive Node.js framework for building efficient, scalable, and enterprise-grade server-side applications with TypeScript/JavaScript 🚀

  • If you come from the Java world I'd suggest to use nestjs + typeorm. It has microservices support plus great abstractions for module definitions, controllers, services. It might be a long ride, but definitely worth it. I'll never go back to old js with express given my past experiences.

  • relay-starter-kit

    Discontinued 💥 Monorepo template (seed project) pre-configured with GraphQL API, PostgreSQL, React, and Joy UI. [Moved to: https://github.com/kriasoft/graphql-starter-kit]

  • It also helps to have a REPL shell for Knex.js — https://i.imgur.com/P5bVdoC.gif

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts