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: destroy sql database on app close
Abdullah Atta15014d2d49bf
diff --git a/apps/web/src/common/db.ts b/apps/web/src/common/db.tsindex fac7590c6..c2b53917c 100644--- a/apps/web/src/common/db.ts+++ b/apps/web/src/common/db.ts@@ -98,6 +98,10 @@ async function initializeDatabase(persistence: DatabasePersistence) {await db.init();+ window.addEventListener("beforeunload", () => {+ db.sql().destroy();+ });+logger.measure("Database initialization");if (db.migrations?.required()) {