mirror of
https://github.com/frappe/books.git
synced 2024-12-23 11:29:03 +00:00
15 lines
394 B
JavaScript
15 lines
394 B
JavaScript
const server = require('frappejs/server');
|
|
const frappe = require('frappejs');
|
|
|
|
module.exports = {
|
|
async initSqlite({dbPath = '_test.db', models} = {}) {
|
|
server.init();
|
|
if (models) {
|
|
frappe.registerModels(models, 'server');
|
|
}
|
|
await server.initDb({
|
|
backend: 'sqlite',
|
|
connectionParams: {dbPath: dbPath},
|
|
});
|
|
}
|
|
} |