+ 1

What is TypeORM?

It supports both Active Record and Data Mapper patterns, unlike all other JavaScript ORMs currently in existence, which means you can write high quality, loosely coupled, scalable, maintainable applications the most productive way.
TypeORM is a tool in the Microframeworks (Backend) category of a tech stack.
TypeORM is an open source tool with 33.8K GitHub stars and 6.2K GitHub forks. Here’s a link to TypeORM's open source repository on GitHub

Who uses TypeORM?

97 companies reportedly use TypeORM in their tech stacks, including kevin., Oxylabs, and Software Engineering.

420 developers on StackShare have stated that they use TypeORM.
Pros of TypeORM
Supports MySQL, PostgreSQL, MariaDB, SQLite, MS SQL Ser
Cons of TypeORM
Easy setup
Works in NodeJS, Browser, Ionic, Cordova and Electron p
Promise Based
Support MySQL & MariaDB, PostgreSQL, MSSQL, Sqlite
Support MongoDB
Decisions about TypeORM

Here are some stack decisions, common use cases and reviews by companies and developers who chose TypeORM in their tech stack.

Dieudonné ALLOGNON
Junior Fullstack Developer · | 5 upvotes · 330.7K views
Needs advice

Hey! I am actually in internship and have an app to create for my structure. It will be an intern app which will allow crud dashboard actions with some data provided by the use of an API of one of the structure partner and make a correspondence to data contained in a private database. Since it's an intern app, I thought about Electron for a desktop app because I did a lot of web with Laravel and the structure goes more for the desktop app. But it will be my first occasion working with this tech.

Is Electron a good choice? Wich ORM should be more complete and adapted to this between Sequelize and TypeORM? (Database will be MySQL) Some charts will be displayed in the app. Is there a library (preferably without jQuery) that suits this stack?

Thank you !

See more
Needs advice

I am trying to figure out how to spin up effective React apps as fast as possible. I have loved my experience with using Next.js so far and have been using Next-Auth as an authentication process.

So far, I have used Django on the backend, but it looks like I can speed things up by ditching the backend and going serverless with the Next.js API routes. That means I am left with a database solution to figure out. Does anyone have experience using Firebase together with React, or alternatively using TypeORM with a PostgreSQL database?

I am valuing ease of development in this decision.

See more
Simon Reymann
Senior Fullstack Developer at QUANTUSflow Software GmbH · | 27 upvotes · 4.8M views

Our whole Node.js backend stack consists of the following tools:

  • Lerna as a tool for multi package and multi repository management
  • npm as package manager
  • NestJS as Node.js framework
  • TypeScript as programming language
  • ExpressJS as web server
  • Swagger UI for visualizing and interacting with the API’s resources
  • Postman as a tool for API development
  • TypeORM as object relational mapping layer
  • JSON Web Token for access token management

The main reason we have chosen Node.js over PHP is related to the following artifacts:

  • Made for the web and widely in use: Node.js is a software platform for developing server-side network services. Well-known projects that rely on Node.js include the blogging software Ghost, the project management tool Trello and the operating system WebOS. Node.js requires the JavaScript runtime environment V8, which was specially developed by Google for the popular Chrome browser. This guarantees a very resource-saving architecture, which qualifies Node.js especially for the operation of a web server. Ryan Dahl, the developer of Node.js, released the first stable version on May 27, 2009. He developed Node.js out of dissatisfaction with the possibilities that JavaScript offered at the time. The basic functionality of Node.js has been mapped with JavaScript since the first version, which can be expanded with a large number of different modules. The current package managers (npm or Yarn) for Node.js know more than 1,000,000 of these modules.
  • Fast server-side solutions: Node.js adopts the JavaScript "event-loop" to create non-blocking I/O applications that conveniently serve simultaneous events. With the standard available asynchronous processing within JavaScript/TypeScript, highly scalable, server-side solutions can be realized. The efficient use of the CPU and the RAM is maximized and more simultaneous requests can be processed than with conventional multi-thread servers.
  • A language along the entire stack: Widely used frameworks such as React or AngularJS or Vue.js, which we prefer, are written in JavaScript/TypeScript. If Node.js is now used on the server side, you can use all the advantages of a uniform script language throughout the entire application development. The same language in the back- and frontend simplifies the maintenance of the application and also the coordination within the development team.
  • Flexibility: Node.js sets very few strict dependencies, rules and guidelines and thus grants a high degree of flexibility in application development. There are no strict conventions so that the appropriate architecture, design structures, modules and features can be freely selected for the development.
See more
Martin Johannesson
Senior Software Developer at IT Minds · | 14 upvotes · 2.9M views
Shared insights

At IT Minds we create customized internal or #B2B web and mobile apps. I have a go to stack that I pitch to our customers consisting of 3 core areas. 1) A data core #backend . 2) A micro #serverless #backend. 3) A user client #frontend.

For the Data Core I create a backend using TypeScript Node.js and with TypeORM connecting to a PostgreSQL Exposing an action based api with Apollo GraphQL

For the micro serverless backend, which purpose is verification for authentication, autorization, logins and the likes. It is created with Next.js api pages. Using MongoDB to store essential information, caching etc.

Finally the frontend is built with React using Next.js , TypeScript and @Apollo. We create the frontend as a PWA and have a AMP landing page by default.

See more

TypeORM's Features

  • automatically create the database table schemes based on your models
  • transparently insert / update / delete to the database your objects
  • map your selections from tables to JavaScript objects and map table columns to object properties
  • easily create one-to-one, many-to-one, one-to-many and many-to-many relations between tables
  • and much more.

TypeORM Alternatives & Comparisons

What are some alternatives to TypeORM?
Sequelize is a promise-based ORM for Node.js and io.js. It supports the dialects PostgreSQL, MySQL, MariaDB, SQLite and MSSQL and features solid transaction support, relations, read replication and more.
Let's face it, writing MongoDB validation, casting and business logic boilerplate is a drag. That's why we wrote Mongoose. Mongoose provides a straight-forward, schema-based solution to modeling your application data and includes built-in type casting, validation, query building, business logic hooks and more, out of the box.
A highly-extensible, open-source Node.js framework that enables you to create dynamic end-to-end REST APIs with little or no coding. Connect to multiple data sources, write business logic in Node.js, glue on top of your existing services and data, connect using JS, iOS & Android SDKs.
Prisma is an open-source database toolkit. It replaces traditional ORMs and makes database access easy with an auto-generated query builder for TypeScript & Node.js.
TypeScript ORM for Node.js based on Data Mapper, Unit of Work and Identity Map patterns. Supports MongoDB, MySQL, MariaDB, PostgreSQL and SQLite databases.
See all alternatives

TypeORM's Followers
802 developers follow TypeORM to keep up with related blogs and decisions.