2
0
mirror of https://github.com/frappe/books.git synced 2024-11-13 00:46:28 +00:00
books/client/index.js

21 lines
543 B
JavaScript
Raw Normal View History

2018-01-12 12:25:07 +00:00
const common = require('frappe-core/common');
const Database = require('frappe-core/backends/rest_client').Database;
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 Database({server: server});
frappe.desk = new Desk();
await frappe.login();
}
};