2
0
mirror of https://github.com/frappe/books.git synced 2024-11-10 07:40:55 +00:00
books/client/index.js

23 lines
559 B
JavaScript
Raw Normal View History

2018-01-16 06:09:17 +00:00
const common = require('frappejs/common');
const RESTClient = require('frappejs/backends/rest_client');
const frappe = require('frappejs');
2018-01-12 12:25:07 +00:00
frappe.ui = require('./ui');
const Desk = require('./desk');
module.exports = {
2018-01-16 06:49:38 +00:00
async start({server}) {
2018-01-12 12:25:07 +00:00
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;
2018-01-12 12:25:07 +00:00
frappe.desk = new Desk();
await frappe.login();
}
};