๐๏ธ Usage with SQL Drivers
To use mikro-orm with MySQL database, install the @mikro-orm/mysql dependency and set the type option to mysql when initializing ORM. The mysql2 package is included as a dependency, no need to install it manually.
๐๏ธ Usage with MongoDB
To use MikroORM with mongo database, do not forget to install @mikro-orm/mongodb dependency. Then call MikroORM.init() as part of bootstrapping your app:
๐๏ธ Usage with NestJS
Installation
๐๏ธ Usage with Next.js
This guide covers integrating MikroORM with Next.js, addressing the unique challenges that arise from Next.js's bundler environment. For a complete working example, see the nextjs-example-app repository.
๐๏ธ Usage with Jest
When testing your own code that uses Jest for the tests, and MikroORM for the database, there are some things to consider.
๐๏ธ Usage with Vanilla JS
MikroORM can be used with vanilla JavaScript using the defineEntity helper or EntitySchema. Both approaches provide full functionality without requiring TypeScript or decorators.
๐๏ธ Usage with transpilers
Babel
๐๏ธ Usage with AdminJS
Installation