2
0
mirror of https://github.com/frappe/books.git synced 2024-09-20 11:29:00 +00:00
books/client/index.js
2018-01-15 17:25:31 +05:30

23 lines
579 B
JavaScript

const common = require('frappe-core/common');
const RESTClient = require('frappe-core/backends/rest_client');
const frappe = require('frappe-core');
frappe.ui = require('./ui');
const Desk = require('./desk');
module.exports = {
async start({server, container}) {
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();
}
};