From 8440d51cef61297eb34a193d6a3ad420a0947340 Mon Sep 17 00:00:00 2001 From: vantezzen Date: Thu, 22 Aug 2019 11:04:50 +0200 Subject: Add support to use custom servers --- src/app.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/app.js') diff --git a/src/app.js b/src/app.js index 0138bc84d..ccf13b555 100644 --- a/src/app.js +++ b/src/app.js @@ -53,13 +53,16 @@ webFrame.setVisualZoomLevelLimits(1, 1); webFrame.setLayoutZoomLevelLimits(0, 0); window.addEventListener('load', () => { - const api = apiFactory(new ServerApi(), new LocalApi()); + const serverApi = new ServerApi(); + const api = apiFactory(serverApi, new LocalApi()); const router = new RouterStore(); - const history = syncHistoryWithStore(hashHistory, router); const stores = storeFactory(api, actions, router); + serverApi.setStores(stores); + const history = syncHistoryWithStore(hashHistory, router); const menu = new MenuFactory(stores, actions); const touchBar = new TouchBarFactory(stores, actions); + window.ferdi = { stores, actions, -- cgit v1.2.3-70-g09d2