Refactor app orchestrator into Application with dependency injection

This commit is contained in:
thePR0M3TH3AN committed 2025-10-03 21:10:22 -04:00
1 parent ef6b8bf1cf
commit cf34e28a47
17 files changed
+525 -375

No files matched your search

+23
View File
@@ -0,0 +1,23 @@
// js/bootstrap.js
import Application from "./app.js";
import nostrService from "./services/nostrService.js";
import r2Service from "./services/r2Service.js";
import { loadView } from "./viewManager.js";
import { setApplication, setApplicationReady } from "./applicationContext.js";
const app = new Application({
services: {
nostrService,
r2Service,
},
loadView,
});
setApplication(app);
const appReady = app.init();
setApplicationReady(appReady);
export { app, appReady };
export default app;