2020-04-24 18:28:32 +02:00
|
|
|
module.exports = async db => {
|
2020-04-28 15:39:35 +02:00
|
|
|
const doc = await db.put({
|
2020-04-24 18:28:32 +02:00
|
|
|
_id: "_design/client",
|
|
|
|
views: {
|
|
|
|
by_type: {
|
|
|
|
map: `function(doc) {
|
|
|
|
emit([doc.type], doc._id)
|
|
|
|
}`,
|
|
|
|
},
|
|
|
|
},
|
2020-05-07 11:53:34 +02:00
|
|
|
})
|
|
|
|
console.log(doc)
|
2020-04-24 18:28:32 +02:00
|
|
|
}
|