1
0
Fork 0
mirror of synced 2024-07-11 09:15:48 +12:00
budibase/packages/server/db/initialiseClientDb.js

14 lines
243 B
JavaScript
Raw Normal View History

2020-04-25 04:28:32 +12:00
module.exports = async db => {
const doc = await db.put({
2020-04-25 04:28:32 +12:00
_id: "_design/client",
views: {
by_type: {
map: `function(doc) {
emit([doc.type], doc._id)
}`,
},
},
});
console.log(doc);
2020-04-25 04:28:32 +12:00
}