mirror of
https://github.com/frappe/books.git
synced 2024-11-14 01:14: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},
|
|
});
|
|
}
|
|
} |