An example app integrating Electron.js with Mikro-ORM. The Electron.js app is scaffolded using electron-vite.
MikroORM uses so called MetadataProvider to get necessary type information about our entities' properties. In this project we use TsMorphMetadataProvider
as metadata provider, its process can be performance heavy and time-consuming. For this reason, metadata cache is automatically generated and stored inside ./temp
folder to JSON files. 1
However, in Electron.js the app gets bundled using Vite into a single JavaScript file, therefore we need to deploy only the compiled output, without TS source files at all. In order to do that, we genrate cache bundle file which can be used together with GeneratedCacheAdapter
.
In order to create new migrations you need to follow these steps:
How to create a new migrationtemp
folder located in the project root)migrations
foldermetadata.json
from mikro-orm-shared.config.ts
if you haven't created your first metadata cache yet.yarn migration:create-init
# For windows $ yarn build:win # For macOS $ yarn build:mac # For Linux $ yarn build:linux
If you have any questions or suggestions, please feel free to open a new issue.
I would appreciate a ⭐ if this repository has been helpful to you in any way.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4