2
0
mirror of https://github.com/frappe/books.git synced 2024-12-23 11:29:03 +00:00
books/client/index.js
Rushabh Mehta 9c49809e09 app.md
2018-01-16 12:19:38 +05:30

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();
}
};