A fully open source & end-to-end encrypted note taking alternative to Evernote.
TypeScript asp-net-coredotnet-coreelectronfosshacktoberfestnote-managmentnote-takingnote-taking-appnotebooknotesnotes-appopen-sourceopensourceprivacyproductivityreactreact-nativereactjsself-hosted
web: call database.setup() before db init
ammarahm-edc881e74aaef4
diff --git a/apps/web/src/common/db.ts b/apps/web/src/common/db.tsindex 94cfae14c..327d76dad 100644--- a/apps/web/src/common/db.ts+++ b/apps/web/src/common/db.ts@@ -28,10 +28,12 @@ let db: Database = {};async function initializeDatabase(persistence: DatabasePersistence) {logger.measure("Database initialization");- const { default: Database } = await import("@notesnook/core/api");+ const { database } = await import("@notesnook/common");const { default: FS } = await import("../interfaces/fs");const { Compressor } = await import("../utils/compressor");- db = new Database(+ db = database;++ database.setup(new NNStorage("Notesnook", persistence),// eslint-disable-next-line @typescript-eslint/ban-ts-comment// @ts-ignore