mirror of
https://github.com/frappe/books.git
synced 2024-11-14 09:24:04 +00:00
23 lines
559 B
JavaScript
23 lines
559 B
JavaScript
const common = require('frappejs/common');
|
|
const RESTClient = require('frappejs/backends/rest_client');
|
|
const frappe = require('frappejs');
|
|
frappe.ui = require('./ui');
|
|
const Desk = require('./desk');
|
|
|
|
module.exports = {
|
|
async start({server}) {
|
|
window.frappe = frappe;
|
|
frappe.init();
|
|
common.init_libs(frappe);
|
|
|
|
frappe.fetch = window.fetch.bind();
|
|
frappe.db = await new RESTClient({server: server});
|
|
|
|
frappe.flags.cache_docs = true;
|
|
|
|
frappe.desk = new Desk();
|
|
await frappe.login();
|
|
}
|
|
};
|
|
|