mirror of
https://github.com/frappe/books.git
synced 2024-12-26 20:30:25 +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},
|
|
});
|
|
}
|
|
} |